update mode_pop_callback to not loop to 0

This commit is contained in:
reaw55 2024-01-08 21:38:16 +07:00
parent 9739ddcf16
commit 595a13a7c1
1 changed files with 8 additions and 2 deletions

View File

@ -136,8 +136,14 @@ void fan_pop_callback(void *ptr)
void mode_pop_callback(void *ptr)
{
uint8_t current_mode = ac_get_mode();
uint8_t new_mode = (current_mode + 1) % 3; // Loop back to 0 when reaching 2
ac_set_state(new_mode, ac_get_temperature(), ac_get_fan_speed());
//uint8_t new_mode = (current_mode + 1) % 3; // Loop back to 1 when reaching 2
if(current_mode == 1) {
ac_set_state(2, ac_get_temperature(), ac_get_fan_speed());
} else if(current_mode == 2) {
ac_set_state(1, ac_get_temperature(), ac_get_fan_speed());
}
//ac_set_state(new_mode, ac_get_temperature(), ac_get_fan_speed());
}
void ac_toggle_pop_callback(void *ptr)