Add ADC helpers to temp_info_t

This commit is contained in:
Scott Lahteine
2019-09-05 19:44:55 -05:00
parent 72876d9045
commit 4cdf7a1b93
2 changed files with 16 additions and 13 deletions

View File

@ -160,6 +160,9 @@ typedef struct TempInfo {
uint16_t acc;
int16_t raw;
float current;
inline void reset() { acc = 0; }
inline void sample(const uint16_t s) { acc += s; }
inline void update() { raw = acc; }
} temp_info_t;
// A PWM heater with temperature sensor