diff --git a/nodes/app.overlay b/nodes/app.overlay index f61dff1..2120987 100644 --- a/nodes/app.overlay +++ b/nodes/app.overlay @@ -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"; }; }; diff --git a/nodes/src/supervisor.c b/nodes/src/supervisor.c index 1e6bfe0..50ef409 100644 --- a/nodes/src/supervisor.c +++ b/nodes/src/supervisor.c @@ -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;