Added spinner to lock gui.

This commit is contained in:
jupfi 2023-12-12 16:57:50 +01:00
parent 7dbf01017f
commit 4bd080e7ac
2 changed files with 12 additions and 5 deletions

View file

@ -895,7 +895,7 @@ class AutoTMController(ModuleController):
)
# Lock GUI
# self.module.view.create_mech_LUT_spinner_dialog()
self.module.view.create_mech_LUT_spinner_dialog()
self.module.model.mech_lut = LUT
@ -918,7 +918,7 @@ class AutoTMController(ModuleController):
TUNING_RANGE = 60
MATCHING_RANGE = 500
tuning_backlash = 45
tuning_backlash = self.module.model.tuning_stepper.BACKLASH_STEPS
# I'm not sure about this value ...
matching_backlash = 0
@ -942,6 +942,11 @@ class AutoTMController(ModuleController):
self.module.model.tuning_stepper.last_direction = tuning_last_direction
self.module.model.matching_stepper.last_direction = matching_last_direction
# Update the positions
self.module.model.tuning_stepper.position = tuning_position
self.module.model.matching_stepper.position = matching_position
self.module.view.on_active_stepper_changed()
logger.debug("Tuning position: %s, Matching position: %s", tuning_position, matching_position)
LUT = self.module.model.mech_lut
@ -961,7 +966,7 @@ class AutoTMController(ModuleController):
logger.debug("Finished position sweep")
self.module.model.mech_lut = LUT
self.module.model.LUT = LUT
# self.module.view.create_mech_LUT_spinner_dialog()
self.module.view.el_LUT_spinner.hide()
def go_to_position(self, tuning_position : int, matching_position : int) -> None:
"""Go to the specified position.

View file

@ -213,7 +213,7 @@ class SavedPosition():
class TuningStepper(Stepper):
TYPE = "Tuning"
MAX_STEPS = 1e6
BACKLASH_STEPS = 45
BACKLASH_STEPS = 60
def __init__(self) -> None:
super().__init__()
@ -224,6 +224,8 @@ class MatchingStepper(Stepper):
TYPE = "Matching"
MAX_STEPS = 1e6
BACKLASH_STEPS = 0
def __init__(self) -> None:
super().__init__()
self.last_direction = None
@ -385,7 +387,7 @@ class AutoTMModel(ModuleModel):
self.el_lut = None
self.mech_lut = None
self.LUT = None
self.last_reflection = None
@property