diff --git a/APP/main.c b/APP/main.c index 204c413..68e51c6 100644 --- a/APP/main.c +++ b/APP/main.c @@ -37,31 +37,39 @@ static void mf_init_all_subdevice_state() { static void time_set_led_state(uint8_t led_num, bool state) { switch (led_num) { case 0: - port_led0_set(state); + port_led0_set(false); + port_led1_set(false); + port_led2_set(false); + port_led3_set(false); break; case 1: port_led0_set(state); - port_led1_set(state); + port_led1_set(false); + port_led2_set(false); + port_led3_set(false); break; case 2: port_led0_set(state); port_led1_set(state); - port_led2_set(state); + port_led2_set(false); + port_led3_set(false); break; case 3: port_led0_set(state); port_led1_set(state); port_led2_set(state); - port_led3_set(state); + port_led3_set(false); break; - - default: - printf("no more led\n"); + case 4: port_led0_set(state); port_led1_set(state); port_led2_set(state); port_led3_set(state); break; + + default: + printf("no more led\n"); + break; } } @@ -125,8 +133,8 @@ static void mf_process_timer_key(key_t *key) { this_device.configuration_mode = true; } else { this_device.time_led_num = this_device.time_led_num + 1; - if (this_device.time_led_num > 3) { - this_device.time_led_num = this_device.time_led_num - 3; + if (this_device.time_led_num > 4) { + this_device.time_led_num = this_device.time_led_num - 4; } }