Skip to content

Commit a089c60

Browse files
committed
Fixed sign issue in moving average
(Should fix temperature glitch)
1 parent 75617e6 commit a089c60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Firmware/FFBoard/Inc/FastAvg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class FastAvg {
6262
template <class T>
6363
class FastMovingAverage{
6464
public:
65-
FastMovingAverage(uint32_t len = 0) : fixedLen(len), count(0){};
65+
FastMovingAverage(int32_t len = 0) : fixedLen(len), count(0){};
6666
~FastMovingAverage(){};
6767

6868
void clear(){
@@ -96,8 +96,8 @@ class FastMovingAverage{
9696
}
9797
private:
9898
T curAvg = 0;
99-
const uint32_t fixedLen;
100-
uint32_t count = 0;
99+
const int32_t fixedLen;
100+
int32_t count = 0;
101101
};
102102

103103
#endif

0 commit comments

Comments
 (0)