Fix battery data type

This commit is contained in:
LowPowerLab 2016-01-11 23:10:02 -05:00
parent f8c65fe7b6
commit 02221e7a4a
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@
#endif #endif
volatile boolean motionDetected=false; volatile boolean motionDetected=false;
float batteryVolts = 5; float batteryVolts = 5;
char BATstr[20]; //longest battery voltage reading message = 9chars char BATstr[10]; //longest battery voltage reading message = 9chars
char sendBuf[32]; char sendBuf[32];
byte sendLen; byte sendLen;
@ -159,7 +159,7 @@ void loop() {
batteryReportCycles++; batteryReportCycles++;
} }
byte cycleCount=BATT_CYCLES; uint16_t cycleCount=BATT_CYCLES;
void checkBattery() void checkBattery()
{ {
if (cycleCount++ == BATT_CYCLES) //only read battery every BATT_CYCLES sleep cycles if (cycleCount++ == BATT_CYCLES) //only read battery every BATT_CYCLES sleep cycles