def _read_command_panel(self, resistance: Resistance):
        self._vision_service.make_camera_look_up()
        self._align_horizontally_with_command_panel()
        self._vision_service.take_image()
        current_image = self._vision_service.take_image()
        command_panel_letters = (self._command_panel_letters_extractor.
                                 extract_letters_from_image(current_image))

        letter_position = resistance.find_nth_digit(0) - 1
        return command_panel_letters[letter_position]
Exemplo n.º 2
0
 def get_target_cell_indix(self, resistance: Resistance):
     position = resistance.find_nth_digit(0)
     try:
         return CommandPanelPosition(position - 1)
     except Exception:
         raise CommandPanelTargetException()