Skip to content

Commit

Permalink
reprise sur reboot minuteur correction
Browse files Browse the repository at this point in the history
  • Loading branch information
xlyric committed Nov 16, 2023
1 parent 73d0332 commit e6787bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ bool discovery_temp = false;
// #define ARDUINO_RUNNING_CORE 1
#endif

#define RELEASE "Version 20231115"
#define RELEASE "Version 20231116"
#ifdef LIGHT_FIRMWARE
#define VERSION "Light " RELEASE
#else
Expand Down
26 changes: 13 additions & 13 deletions src/functions/minuteur.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,28 +162,28 @@ struct Programme {

///vérification que le ntp est synchronisé
if(timeClient.isTimeSet()) {
if (heures == timeClient.getHours() && minutes == timeClient.getMinutes() && temperature > gDisplayValues.temperature ) {
if ( heures == timeClient.getHours() && minutes == timeClient.getMinutes() && temperature > gDisplayValues.temperature ) {
// demarrage du cooler
commande_run();
return true;
}
}

// remise en route en cas de reboot et si l'heure est dépassée
if (timeClient.getHours() >= heures && timeClient.getMinutes() >= minutes && run == false && heures <= heures_fin) {
if (timeClient.getHours() <= heures_fin && timeClient.getMinutes() <= minutes_fin) {
commande_run();
return true;
}

sscanf(heure_demarrage, "%d:%d", &heures, &minutes);
if(timeClient.isTimeSet()) {
if (heures < timeClient.getHours() && minutes < timeClient.getMinutes()) {
commande_run();

// remise en route en cas de reboot et si l'heure est dépassée
if (timeClient.getHours() >= heures && timeClient.getHours() <= heures_fin && timeClient.getMinutes() < minutes_fin) {
commande_run();
return true;
}
}
}
/// ??? doublon ?
// if(timeClient.isTimeSet()) {
// if (heures < timeClient.getHours() && minutes < timeClient.getMinutes()) {
// commande_run();
// return true;
// }
// }


// protection fuite mémoire
if (temperature > 500) {
Expand Down

0 comments on commit e6787bf

Please sign in to comment.