fix raingauge

This commit is contained in:
interfisch 2020-11-01 14:40:23 +01:00
parent 5e00a7974b
commit 87a095015c
2 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,7 @@ build_flags =
-D dataRaingauge_readdelay=1000 -D dataRaingauge_readdelay=1000
-D dataRaingauge_senddelaymax=1000*60*60 #also used for rain waiting timeout -D dataRaingauge_senddelaymax=1000*60*60 #also used for rain waiting timeout
# Cable from Anemometer: Black=GND, Blue=3v3, Brown=Signal (needs pullup (internal)) # Cable from Anemometer: Black=GND, Blue=3v3, Brown=Signal (needs pullup (internal))
#Cable colors from anemometers sensor (before longer able): blue=gnd, brown=vcc, white=signal
lib_deps = lib_deps =
Adafruit BMP085 Library@1.1.0 Adafruit BMP085 Library@1.1.0

View File

@ -186,6 +186,7 @@ struct sensordata
#endif #endif
#ifdef SENSOR_ANEMOMETER #ifdef SENSOR_ANEMOMETER
//uses ATS177 Latched hall sensor for rotation sensing
sensordata dataAnemometer; sensordata dataAnemometer;
unsigned long anemometer_lasttimereset=0; unsigned long anemometer_lasttimereset=0;
uint16_t anemometer_pulsecounter=0; //counted pulses since last reset uint16_t anemometer_pulsecounter=0; //counted pulses since last reset
@ -200,6 +201,7 @@ struct sensordata
#endif #endif
#ifdef SENSOR_RAINGAUGE #ifdef SENSOR_RAINGAUGE
//uses ATS177 Latched Hall Sensor for rauge flip sensing
sensordata dataRaingauge; sensordata dataRaingauge;
unsigned long raingauge_lasttimereset=0; unsigned long raingauge_lasttimereset=0;
uint16_t raingauge_pulsecounter=0; //counted pulses since last reset uint16_t raingauge_pulsecounter=0; //counted pulses since last reset
@ -1097,7 +1099,7 @@ void loopHandler() {
#endif #endif
#ifdef SENSOR_RAINGAUGE #ifdef SENSOR_RAINGAUGE
loop_anemometer(); loop_raingauge();
#endif #endif
} }