fix(nodes): fixing switch device tree and wrong ordering of ble values
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
buttons{
|
||||
compatible = "gpio-keys";
|
||||
window_switch: window_switch {
|
||||
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&sx1509b 0 GPIO_ACTIVE_LOW>;
|
||||
label = "Window Switch";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -19,7 +19,6 @@ enum error_code supervisor_init(){
|
||||
}else{}
|
||||
}else{}
|
||||
}else{}
|
||||
// debug with led set -> init and blink led red
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -37,7 +36,7 @@ enum error_code supervisor_run(){
|
||||
window_status = window_get_value(&window_value);
|
||||
// maybe change arguments order
|
||||
// todo : manage special values
|
||||
ble_advertise(co2_lvl_value, hygro_value, thermo_value, window_status);
|
||||
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
|
||||
current_sleep_time = SLEEP_MIN_DURATION;
|
||||
|
||||
Reference in New Issue
Block a user