Voltsensor test series has a constant, too
This commit is contained in:
parent
a8837d3119
commit
46ab832624
@ -101,6 +101,7 @@
|
|||||||
|
|
||||||
#define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatur sensors */
|
#define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatur sensors */
|
||||||
#define TEMP_SENSOR_MEASURE_SERIES 5
|
#define TEMP_SENSOR_MEASURE_SERIES 5
|
||||||
|
#define VOLT_SENSOR_MEASURE_SERIES 5
|
||||||
|
|
||||||
/* @} */
|
/* @} */
|
||||||
#endif
|
#endif
|
@ -85,8 +85,8 @@ int readCounter = 0;
|
|||||||
bool mConfigured = false;
|
bool mConfigured = false;
|
||||||
long nextBlink = 0; /**< Time needed in main loop to support expected blink code */
|
long nextBlink = 0; /**< Time needed in main loop to support expected blink code */
|
||||||
|
|
||||||
RunningMedian lipoRawSensor = RunningMedian(5);
|
RunningMedian lipoRawSensor = RunningMedian(VOLT_SENSOR_MEASURE_SERIES);
|
||||||
RunningMedian solarRawSensor = RunningMedian(5);
|
RunningMedian solarRawSensor = RunningMedian(VOLT_SENSOR_MEASURE_SERIES);
|
||||||
RunningMedian waterRawSensor = RunningMedian(5);
|
RunningMedian waterRawSensor = RunningMedian(5);
|
||||||
RunningMedian lipoTempSensor = RunningMedian(TEMP_SENSOR_MEASURE_SERIES);
|
RunningMedian lipoTempSensor = RunningMedian(TEMP_SENSOR_MEASURE_SERIES);
|
||||||
RunningMedian waterTempSensor = RunningMedian(TEMP_SENSOR_MEASURE_SERIES);
|
RunningMedian waterTempSensor = RunningMedian(TEMP_SENSOR_MEASURE_SERIES);
|
||||||
@ -180,7 +180,7 @@ long getDistance()
|
|||||||
*/
|
*/
|
||||||
void readSystemSensors()
|
void readSystemSensors()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < VOLT_SENSOR_MEASURE_SERIES; i++)
|
||||||
{
|
{
|
||||||
lipoRawSensor.add(analogRead(SENSOR_LIPO));
|
lipoRawSensor.add(analogRead(SENSOR_LIPO));
|
||||||
solarRawSensor.add(analogRead(SENSOR_SOLAR));
|
solarRawSensor.add(analogRead(SENSOR_SOLAR));
|
||||||
|
Loading…
Reference in New Issue
Block a user