The new v1.3 codebase easily allows non-integer sampling rates for the control task. We have updated the scheduler to handle this by keeping track of time using double type variables. This seems to be working well.
However, the logging system still uses uint32_t types to keep track of time. I have a feeling this will lead to logging issues for some configurations of system sample rates.
Before we release v1.3, we need to make a comprehensive test suite to verify that logging actually works for different settings. For example, set up a sinusoid at 1/10 the control rate in the code, then log it and check the output data still looks as it should. Do this for a range of sample rate settings and log settings.
Per this discussion: https://github.com/Severson-Group/AMDC-Firmware/pull/401#discussion_r1648072962
The new
v1.3
codebase easily allows non-integer sampling rates for the control task. We have updated the scheduler to handle this by keeping track of time usingdouble
type variables. This seems to be working well.However, the logging system still uses
uint32_t
types to keep track of time. I have a feeling this will lead to logging issues for some configurations of system sample rates.Before we release
v1.3
, we need to make a comprehensive test suite to verify that logging actually works for different settings. For example, set up a sinusoid at 1/10 the control rate in the code, then log it and check the output data still looks as it should. Do this for a range of sample rate settings and log settings.