| @@ -74,7 +74,7 @@ public: | |||
| uint32_t sum = 0; | |||
| do { | |||
| sum += output[binFirst++]; | |||
| } while (binFirst < binLast); | |||
| } while (binFirst <= binLast); | |||
| return (float)sum * (1.0 / 16384.0); | |||
| } | |||
| void averageTogether(uint8_t n) { | |||
| @@ -82,7 +82,7 @@ public: | |||
| uint32_t sum = 0; | |||
| do { | |||
| sum += output[binFirst++]; | |||
| } while (binFirst < binLast); | |||
| } while (binFirst <= binLast); | |||
| return (float)sum * (1.0 / 16384.0); | |||
| } | |||
| void averageTogether(uint8_t n) { | |||