sonelu / roboglia

Robotics framework
GNU General Public License v3.0
0 stars 1 forks source link

[BUG] BaseSync should mark the registers when start() is called instead of __init__ and unflag them when stop() is invoked #68

Closed sonelu closed 4 years ago

sonelu commented 4 years ago

Describe the bug At the moment the constructor of the BaseSync flags the registers as sync in the constructor.

We should:

  1. change this to be done in the start() instead.
  2. check that the register is not already flagged for sync and issue a warning (a register should be covered by one sync only)
  3. unflag the registers when the stop() is called. (that is why we need to have one register assigned to one async because in this case the sync for the register will be conflicting when one of the syncs stops.

To Reproduce

Expected behavior When robot is created the registers are staying un-synced. When the robot starts it has the chance to update directly any settings of the registers before letting the syncs start. This way you can avoid having trash information in the internal registers of the devices that is replicated by the syncs with possible damage to the robot.

Screenshots

Desktop (please complete the following information):

Additional context