small param adjustment+fix

This commit is contained in:
Felix Rusu 2014-11-07 11:07:36 -05:00
parent b977159efd
commit fce4d74efe
1 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,6 @@ void loop() {
DEBUGln(BATstr); DEBUGln(BATstr);
radio.sleep(); radio.sleep();
motionDetected=false;
digitalWrite(EXTLED, LOW); digitalWrite(EXTLED, LOW);
} }
else if (batteryReportCycles == BATT_CYCLES) else if (batteryReportCycles == BATT_CYCLES)
@ -131,6 +130,7 @@ void loop() {
radio.sleep(); radio.sleep();
batteryReportCycles=0; batteryReportCycles=0;
} }
motionDetected=false; //do NOT move this after the SLEEP line below or motion will never be detected
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
batteryReportCycles++; batteryReportCycles++;
} }