Improve performance of motor detect switch

by using the right variable WHOOPS
This commit is contained in:
jameswood 2015-08-31 22:59:08 +10:00
parent f1e592ba1e
commit 4fdd7f3fd6
1 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ void getOnline(){
void loop() {
if(WiFi.status() != WL_CONNECTED) getOnline();
if (!mqttclient.connected()) mqttclient.connect(clientName);
feedButtonDebounced.update();
motorSwitchDebounced.update();
mqttclient.loop(); //
@ -87,7 +88,7 @@ void loop() {
lastAnnounced = 1;
}
digitalWrite(motorPin, HIGH);
if (feedButtonDebounced.fell()){
if (motorSwitchDebounced.fell()){
digitalWrite(motorPin, LOW);
botMode = 0;
modeStartTime = 0;