Skip to content

Commit

Permalink
upadate debug
Browse files Browse the repository at this point in the history
  • Loading branch information
loan-mgt committed Jul 24, 2023
1 parent f03aee4 commit 1b59ed8
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions verylowsun/verylowsun.ino
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,18 @@ void manageSettingsOpen() {
if (doorOpenCharacteristic.written() ) {

Serial.println("update Door Open settings");
Serial.print(doorOpenCharacteristic.value()[0]);
Serial.print(";");
Serial.print(doorOpenCharacteristic.value()[1]);
Serial.print(";");
Serial.print(doorOpenCharacteristic.value()[2]);
Serial.print(";");
Serial.println(doorOpenCharacteristic.value()[3]);

doorOpenMode = doorOpenCharacteristic.value()[0];
doorOpenLightThreshold = doorOpenCharacteristic.value()[1]*4;
doorOpenTimeH = doorOpenCharacteristic.value()[2];
doorOpenTimeM = doorOpenCharacteristic.value()[3];
Serial.print(doorOpenMode);
Serial.print(";");
Serial.print(doorOpenLightThreshold);
Serial.print(";");
Serial.print(doorOpenTimeH);
Serial.print(";");
Serial.println(doorOpenTimeM);

}
}
Expand All @@ -299,21 +300,21 @@ void manageSettingsClose() {
if (doorCloseCharacteristic.written() ) {

Serial.println("update Door Close settings");
Serial.print(doorCloseCharacteristic.value()[0]);
Serial.print(";");
Serial.print(doorCloseCharacteristic.value()[1]);
Serial.print(";");
Serial.print(doorCloseCharacteristic.value()[2]);
Serial.print(";");
Serial.println(doorCloseCharacteristic.value()[3]);

doorCloseMode = doorCloseCharacteristic.value()[0];
doorCloseLightThreshold = doorCloseCharacteristic.value()[1]*4;
doorCloseTimeH = doorCloseCharacteristic.value()[2];
doorCloseTimeM = doorCloseCharacteristic.value()[3];

} else {
//todo
}
Serial.print(doorCloseMode);
Serial.print(";");
Serial.print(doorCloseLightThreshold);
Serial.print(";");
Serial.print(doorCloseTimeH);
Serial.print(";");
Serial.println(doorCloseTimeM);

}
}


Expand Down

0 comments on commit 1b59ed8

Please sign in to comment.