1
0
forked from me/IronOS

Fix calibration, move to exp moving average

This commit is contained in:
Ben V. Brown
2019-10-08 21:50:50 +11:00
parent 6a39e4bcc8
commit 3fea95c6b1
10 changed files with 61 additions and 33 deletions

View File

@@ -12,7 +12,7 @@
const uint16_t powerPWM = 255;
const uint16_t totalPWM = 255 + 17; //htim2.Init.Period, the full PWM cycle
history<uint32_t, oscillationPeriod> x10WattHistory = { { 0 }, 0, 0 };
expMovingAverage<uint32_t, wattHistoryFilter> x10WattHistory = { 0 };
int32_t tempToX10Watts(int32_t rawTemp) {
// mass is in milliJ/*C, rawC is raw per degree C