gnthibault / RemoteObservatory

Astronomical observatory control system
https://gnthibault.github.io/RemoteObservatory/README.md
GNU General Public License v3.0
10 stars 3 forks source link

Refactor and cleanup statemachine #30

Open gnthibault opened 1 year ago

gnthibault commented 1 year ago

We expect that one can easily change the states, so it means that NO mention to explicit next_state should be found anywhere in the state python file. The idea is:

  1. Do a large "merge" to get all changes from original project, that might require even rewritten project history: https://github.com/panoptes/POCS
  2. Refer to a generic transition in python code, and expect the destination state to be defined in the state yaml file. Example: call tracking_ok_trigger or tracking_error_trigger in the code, and in the config yaml have something like:
    -
        source: tracking
        dest: focusing
        trigger: tracking_ok_trigger
        conditions: mount_is_tracking

or

    -
        source: tracking
        dest: focusing
        trigger: tracking_error_trigger
gnthibault commented 1 year ago

Please checkout: https://github.com/AstroHuntsman/