mirror of
https://github.com/nqrduck/nqrduck-autotm.git
synced 2024-11-09 11:40:02 +00:00
Added spinner to lock gui.
This commit is contained in:
parent
7dbf01017f
commit
4bd080e7ac
2 changed files with 12 additions and 5 deletions
|
@ -895,7 +895,7 @@ class AutoTMController(ModuleController):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Lock GUI
|
# Lock GUI
|
||||||
# self.module.view.create_mech_LUT_spinner_dialog()
|
self.module.view.create_mech_LUT_spinner_dialog()
|
||||||
|
|
||||||
self.module.model.mech_lut = LUT
|
self.module.model.mech_lut = LUT
|
||||||
|
|
||||||
|
@ -918,7 +918,7 @@ class AutoTMController(ModuleController):
|
||||||
TUNING_RANGE = 60
|
TUNING_RANGE = 60
|
||||||
MATCHING_RANGE = 500
|
MATCHING_RANGE = 500
|
||||||
|
|
||||||
tuning_backlash = 45
|
tuning_backlash = self.module.model.tuning_stepper.BACKLASH_STEPS
|
||||||
# I'm not sure about this value ...
|
# I'm not sure about this value ...
|
||||||
matching_backlash = 0
|
matching_backlash = 0
|
||||||
|
|
||||||
|
@ -942,6 +942,11 @@ class AutoTMController(ModuleController):
|
||||||
self.module.model.tuning_stepper.last_direction = tuning_last_direction
|
self.module.model.tuning_stepper.last_direction = tuning_last_direction
|
||||||
self.module.model.matching_stepper.last_direction = matching_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)
|
logger.debug("Tuning position: %s, Matching position: %s", tuning_position, matching_position)
|
||||||
|
|
||||||
LUT = self.module.model.mech_lut
|
LUT = self.module.model.mech_lut
|
||||||
|
@ -961,7 +966,7 @@ class AutoTMController(ModuleController):
|
||||||
logger.debug("Finished position sweep")
|
logger.debug("Finished position sweep")
|
||||||
self.module.model.mech_lut = LUT
|
self.module.model.mech_lut = LUT
|
||||||
self.module.model.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:
|
def go_to_position(self, tuning_position : int, matching_position : int) -> None:
|
||||||
"""Go to the specified position.
|
"""Go to the specified position.
|
||||||
|
|
|
@ -213,7 +213,7 @@ class SavedPosition():
|
||||||
class TuningStepper(Stepper):
|
class TuningStepper(Stepper):
|
||||||
TYPE = "Tuning"
|
TYPE = "Tuning"
|
||||||
MAX_STEPS = 1e6
|
MAX_STEPS = 1e6
|
||||||
BACKLASH_STEPS = 45
|
BACKLASH_STEPS = 60
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
@ -224,6 +224,8 @@ class MatchingStepper(Stepper):
|
||||||
TYPE = "Matching"
|
TYPE = "Matching"
|
||||||
MAX_STEPS = 1e6
|
MAX_STEPS = 1e6
|
||||||
|
|
||||||
|
BACKLASH_STEPS = 0
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.last_direction = None
|
self.last_direction = None
|
||||||
|
|
Loading…
Reference in a new issue