tim-balloon / TIMflight

Flight MCP repo
0 stars 0 forks source link

fix CPU temp, voltage, current reads #19

Closed evanmayer closed 2 years ago

evanmayer commented 2 years ago

These constants appeared to be out of date, giving bad CPU state readouts when compared with output of sensors on command line.

We stumbled on this while timing mcp x Hz loops, and investigating the cause of a ~0.02 s latency incurred every ~2s. We isolated it to this file, and replicated the behavior in a standalone program with sensors_get_value() calls. Root cause not yet identified, suspected to be a resource conflict with some other program that is also querying CPU sensors at a .5 Hz cadence.