Skip to content

Refactor meridian state capture logic to state machine

Next step towards dedicated state machines: Shift meridian state handling from Capture to the module's state machine. With this change, the entire state handling of a meridian flip is now encapsulated inside CaptureModuleState.

In detail, this contains the following changes:

  • CaptureModuleState::updateMFMountState, which is the central entry point for all meridian flip status changes of Mount has been moved here from Capture::meridianFlipStatusChanged. With this change now the entire functional translation of the mount module perspective upon meridian flips into the broader meridian flip state of the Capture module now is part of the state machine.
  • The signals newMeridianFlipStage and meridianFlipStarted are now sent from the state machine.
  • Capture::setMeridianFlipStage has been renamed to Capture::updateMeridianFlipStage and contains now only UI updates, all functional parts have been relocated to CaptureModuleState::updateMeridianFlipStage.
  • Capture::updateMFMountState is the new and forwards the mount meridian flip states to the capture state machine. This indirection is necessary since the state forwarding happens inside of the Manager and the capture state machine is not publicly visible.
  • Capture::isGuidingOn is moved to CaptureModuleState.
  • The pause function - i.e. the function to continue after pausing - now is a static attribute in CaptureModuleState instead of a function link inside Capture.

After this change, only parts of the post meridian flip handling remains inside Capture, which will be subject to a subsequent refactoring.

Edited by Wolfgang Reissenberger

Merge request reports