mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
1) Use floating-point more freely, since it's on all the time now, and the old fixed-point code no longer compiled. 2) Sensitivity and Bn values are now in a RAM-based struct in preparation for setting them at runtime. No changes from current values. 3) If a sensor fails to read good data, is initialized, or loses power, its die temperature history will be set to the next good temperature, rather than persisting an arbitrary start value or old state. This fixes reading wildly inaccurate object temperatures for the first few seconds following boot/resume. 4) If a sensor loses power, wait for the sensor to report data-ready before reading temperature/voltage. Otherwise, those read as 0, which again throws off the first few seconds of data. BUG=chrome-os-partner:14955 BRANCH=link TEST=Boot system and set at login screen for a minute to reach thermal equilibrium. Then reboot system, type 'temps' repeatedly. Data from TMP006's should initially be Error; after a second or so it should be good, and shouldn't change more than a few degrees. Change-Id: Id0b42b9b18e94978ba7d3a1ee33194e44b1904bc Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/35188