spel-uchile / SUCHAI

SUCHAI Cubesat flight software
GNU Lesser General Public License v3.0
20 stars 5 forks source link

Payloads state machine does not preserve the status after a reset #27

Open carlgonz opened 6 years ago

carlgonz commented 6 years ago

The payloads state machine is designed to take a limited number of samples of each payloads. However, the execution counter is "initialized" (not properly initialized in the source code) after a reset. The later means that if the payload execution limit is set to 100 and before a reset it counter was set to 90, then after the reset the execution will continue from 0 resulting in 190 samples. This may cause issues with the payloads buffers.

See: https://github.com/spel-uchile/SUCHAI/blob/cccbc9abd4636234ec46cd29c5dcd0759b75a31e/Payloads/Cmd/cmdPayload.c#L1607