Voltsensor test series has a constant, too

This commit is contained in:
Ollo 2020-12-28 14:26:41 +01:00
parent a8837d3119
commit 46ab832624
2 changed files with 4 additions and 3 deletions

View File

@ -101,6 +101,7 @@
#define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatur sensors */
#define TEMP_SENSOR_MEASURE_SERIES 5
#define VOLT_SENSOR_MEASURE_SERIES 5
/* @} */
#endif

View File

@ -85,8 +85,8 @@ int readCounter = 0;
bool mConfigured = false;
long nextBlink = 0; /**< Time needed in main loop to support expected blink code */
RunningMedian lipoRawSensor = RunningMedian(5);
RunningMedian solarRawSensor = RunningMedian(5);
RunningMedian lipoRawSensor = RunningMedian(VOLT_SENSOR_MEASURE_SERIES);
RunningMedian solarRawSensor = RunningMedian(VOLT_SENSOR_MEASURE_SERIES);
RunningMedian waterRawSensor = RunningMedian(5);
RunningMedian lipoTempSensor = RunningMedian(TEMP_SENSOR_MEASURE_SERIES);
RunningMedian waterTempSensor = RunningMedian(TEMP_SENSOR_MEASURE_SERIES);
@ -180,7 +180,7 @@ long getDistance()
*/
void readSystemSensors()
{
for (int i = 0; i < 5; i++)
for (int i = 0; i < VOLT_SENSOR_MEASURE_SERIES; i++)
{
lipoRawSensor.add(analogRead(SENSOR_LIPO));
solarRawSensor.add(analogRead(SENSOR_SOLAR));