Fixed plant loop in mode1
This commit is contained in:
parent
902b81ab3e
commit
6ba2f92fa7
@ -550,7 +550,7 @@ bool mode1(){
|
||||
Serial.println("1 missing rtc value, going to mode2");
|
||||
return true;
|
||||
}
|
||||
for(int i = 0;i<6;i++){
|
||||
for(int i = 0; i < MAX_PLANTS; i++){
|
||||
long trigger =getMoistureTrigger(i);
|
||||
if (trigger == 0) {
|
||||
Serial << "Missing rtc trigger " << i << endl;
|
||||
@ -559,7 +559,7 @@ bool mode1(){
|
||||
if(trigger == DEACTIVATED_PLANT){
|
||||
continue;
|
||||
}
|
||||
if(mPlants[0].getSensorValue() <= trigger){
|
||||
if(mPlants[i].getSensorValue() <= trigger){
|
||||
Serial << "plant dry starting mode 2" << i << endl;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user