feat(nodes): adding management of read error on each values, hence

Closes: #65
This commit is contained in:
adrien balleyguier
2026-05-07 08:44:32 +02:00
committed by Klagarge
parent 6b12612580
commit c4e1315478

View File

@@ -31,6 +31,18 @@ enum error_code supervisor_run(){
thermo_status = thermo_get_value(&thermo_value);
window_status = window_get_value(&window_value);
// todo : manage non-success error codes
if(success != co2_lvl_status){
co2_lvl_value = -1;
}else{}
if(success != hygro_status){
hygro_value = -1;
}else{}
if(success != thermo_status){
thermo_value = -1;
}else{}
if(success != window_status){
window_value = unknown;
}else{}
ble_advertise(window_value, hygro_value, thermo_value, co2_lvl_value);
if((co2_lvl_value > CO2_LEVEL_EMPTY_ROOM) || (window_value == open)){
// there are people in the room, or someone forgot to close the window