nasa-jpl / jsd

Just SOEM Drivers
Other
18 stars 15 forks source link

Elmo drivers assert on validity of digital output index command #81

Closed d-loret closed 10 months ago

d-loret commented 1 year ago

Currently the Gold and Platinum drivers assert the validity of the digital output index when setting digital outputs:

https://github.com/nasa-jpl/jsd/blob/master/src/jsd_egd.c#L126 https://github.com/nasa-jpl/jsd/blob/master/src/jsd_epd.c#L158

This would bring the entire system down.

Since these functions are used live through Commander in the Casah stack, the probability of someone inputting an invalid index because of a typo or something else is not insignificant. The entire control system should not be brought down because of this.

A graceful handling of the situation should ignore the command and potentially notify about the error.

preston-rogers commented 1 year ago

I just made the modifications and tested them.