UWCubeSat / DubSat1

Main repository for all flight software (including all subsystems, core libraries, and hardware abstraction layers) for the DubSat-1 3U Cubesat.
22 stars 10 forks source link

Averages eventually become 0xFFFF #202

Closed nkwacker closed 6 years ago

nkwacker commented 6 years ago

Pretty self-explanatory. The mins and maxes seem to be reasonable, but the average does not fall between them.

nkwacker commented 6 years ago

This phenomenon seems to happen to all uint16 values

nkwacker commented 6 years ago

This issue is that the unsigned int does not handle negative current

nkwacker commented 6 years ago

Reopened because the issue is still happening, specifically on dist board for all currents, COM1 voltage average, and Estim voltage average. It is also interesting to note that these averages do not fall between their respective mins and maxes, which are still quite reasonable

nkwacker commented 6 years ago

Bdot also seems to have the same problem for its magnetometer aggregates

nkwacker commented 6 years ago

For Bdot this behavior makes a lot of sense, as it only was happening during SPAM. Likely something similar is going on on dist

nkwacker commented 6 years ago

This issue is also happening with all averages on batt

nkwacker commented 6 years ago

And Gen as well. I suspect that the issue is in aggLib