nasa-jpl / fastcat

C++ EtherCAT Device Command & Control Library
Other
42 stars 11 forks source link

Review unnecessary GoldActuator state assignment #88

Open alex-brinkman opened 1 year ago

alex-brinkman commented 1 year ago

I do not think the below assignments are necessary. When the Fastcat manager calls its Process function, the state from the underlying JSD device will be read first, so jsd_egd_state_ will end up with the values assigned in jsd_egd_fault.

Only way this could not be the case would be if the JSD driver changed its rxpdo between the call to jsd_egd_fault and the call to Actuator::Read(), and that is not possible because the writing and processing functions of the JSD driver are called AFTER the Fastcat manager reads states.

I will not remove them with my changes, but I think we should in the upcoming PRs.

_Originally posted by @d-loret in https://github.com/nasa-jpl/fastcat/pull/86#discussion_r1155050377_