add pressed state for mvp

This commit is contained in:
reaw55 2024-01-19 12:06:33 +07:00
parent 1357f212f5
commit 06ee00d60e
27 changed files with 26 additions and 26 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

View File

@ -282,7 +282,7 @@ void update_lcd_row1()
elcd.print(master_state ? 10 : 9);
elcd_send_stop_bit();
elcd.print("row1_master.pic2=");
elcd.print(master_state ? 10 : 9);
elcd.print(master_state ? 46 : 45);
elcd_send_stop_bit();
bool lt1_state = pwm_get_state(ROW1_LIGHT1);
@ -291,16 +291,16 @@ void update_lcd_row1()
// row1_lv1.Set_background_image_pic(lt1_state?6:5);
// row1_lv2.Set_background_image_pic(lt2_state?8:7);
elcd.print("row1_lv1.pic=");
elcd.print(lt1_state ? 6 : 5);
elcd.print(lt1_state ? 6 : 5); // 6 on ; 5 off
elcd_send_stop_bit();
elcd.print("row1_lv2.pic=");
elcd.print(lt2_state ? 8 : 7);
elcd_send_stop_bit();
elcd.print("row1_lv1.pic2=");
elcd.print(lt1_state ? 6 : 5);
elcd.print(lt1_state ? 38 : 37);
elcd_send_stop_bit();
elcd.print("row1_lv2.pic2=");
elcd.print(lt2_state ? 8 : 7);
elcd.print(lt2_state ? 40 : 39);
elcd_send_stop_bit();
}
@ -313,7 +313,7 @@ void update_lcd_row2()
elcd.print(master_state ? 12 : 11);
elcd_send_stop_bit();
elcd.print("row2_master.pic2=");
elcd.print(master_state ? 12 : 11);
elcd.print(master_state ? 48 : 47);
elcd_send_stop_bit();
bool lt1_state = pwm_get_state(ROW2_LIGHT1);
bool lt2_state = pwm_get_state(ROW2_LIGHT2);
@ -327,10 +327,10 @@ void update_lcd_row2()
elcd.print(lt2_state ? 8 : 7);
elcd_send_stop_bit();
elcd.print("row2_lv1.pic2=");
elcd.print(lt1_state ? 6 : 5);
elcd.print(lt1_state ? 38 : 37);
elcd_send_stop_bit();
elcd.print("row2_lv2.pic2=");
elcd.print(lt2_state ? 8 : 7);
elcd.print(lt2_state ? 40 : 39);
elcd_send_stop_bit();
}
@ -343,7 +343,7 @@ void update_lcd_row3()
elcd.print(master_state ? 14 : 13);
elcd_send_stop_bit();
elcd.print("row3_master.pic2=");
elcd.print(master_state ? 14 : 13);
elcd.print(master_state ? 50 : 49);
elcd_send_stop_bit();
bool lt1_state = pwm_get_state(ROW3_LIGHT1);
bool lt2_state = pwm_get_state(ROW3_LIGHT2);
@ -357,10 +357,10 @@ void update_lcd_row3()
elcd.print(lt2_state ? 8 : 7);
elcd_send_stop_bit();
elcd.print("row3_lv1.pic2=");
elcd.print(lt1_state ? 6 : 5);
elcd.print(lt1_state ? 38 : 37);
elcd_send_stop_bit();
elcd.print("row3_lv2.pic2=");
elcd.print(lt2_state ? 8 : 7);
elcd.print(lt2_state ? 40 : 39);
elcd_send_stop_bit();
}
@ -373,7 +373,7 @@ void update_lcd_row4()
elcd.print(master_state ? 16 : 15);
elcd_send_stop_bit();
elcd.print("row4_master.pic2=");
elcd.print(master_state ? 16 : 15);
elcd.print(master_state ? 52 : 51);
elcd_send_stop_bit();
bool lt1_state = pwm_get_state(ROW4_LIGHT1);
bool lt2_state = pwm_get_state(ROW4_LIGHT2);
@ -387,10 +387,10 @@ void update_lcd_row4()
elcd.print(lt2_state ? 8 : 7);
elcd_send_stop_bit();
elcd.print("row4_lv1.pic2=");
elcd.print(lt1_state ? 6 : 5);
elcd.print(lt1_state ? 38 : 37);
elcd_send_stop_bit();
elcd.print("row4_lv2.pic2=");
elcd.print(lt2_state ? 8 : 7);
elcd.print(lt2_state ? 40 : 39);
elcd_send_stop_bit();
}
@ -404,7 +404,7 @@ void update_toggle_button()
elcd.print(current_state ? 4 : 3);
elcd_send_stop_bit();
elcd.print("light_toggle.pic2=");
elcd.print(current_state ? 4 : 3);
elcd.print(current_state ? 44 : 43);
elcd_send_stop_bit();
}
@ -423,7 +423,7 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("fan.pic=18");
elcd_send_stop_bit();
elcd.print("fan.pic2=18");
elcd.print("fan.pic2=30");
elcd_send_stop_bit();
}
else if (fan_speed == 1)
@ -432,7 +432,7 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("fan.pic=19");
elcd_send_stop_bit();
elcd.print("fan.pic2=19");
elcd.print("fan.pic2=31");
elcd_send_stop_bit();
}
else if (fan_speed == 2)
@ -441,7 +441,7 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("fan.pic=21");
elcd_send_stop_bit();
elcd.print("fan.pic2=21");
elcd.print("fan.pic2=33");
elcd_send_stop_bit();
}
else if (fan_speed == 3)
@ -450,7 +450,7 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("fan.pic=20");
elcd_send_stop_bit();
elcd.print("fan.pic2=20");
elcd.print("fan.pic2=32");
elcd_send_stop_bit();
}
else
@ -459,7 +459,7 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("fan.pic=18");
elcd_send_stop_bit();
elcd.print("fan.pic2=18");
elcd.print("fan.pic2=30");
elcd_send_stop_bit();
}
// update the mode cool is 22, fan mode is 24, for off the toggle button act as indicator
@ -472,11 +472,11 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("air_toggle.pic=2");
elcd_send_stop_bit();
elcd.print("air_toggle.pic2=2");
elcd.print("air_toggle.pic2=42");
elcd_send_stop_bit();
elcd.print("mode.pic=22");
elcd_send_stop_bit();
elcd.print("mode.pic2=22");
elcd.print("mode.pic2=34");
elcd_send_stop_bit();
}
else if (ac_get_mode() == 2)
@ -484,11 +484,11 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("air_toggle.pic=2");
elcd_send_stop_bit();
elcd.print("air_toggle.pic2=2");
elcd.print("air_toggle.pic2=42");
elcd_send_stop_bit();
elcd.print("mode.pic=24");
elcd_send_stop_bit();
elcd.print("mode.pic2=24");
elcd.print("mode.pic2=36");
elcd_send_stop_bit();
}
else if (ac_get_mode() == 0)
@ -496,13 +496,13 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("air_toggle.pic=1");
elcd_send_stop_bit();
elcd.print("air_toggle.pic2=1");
elcd.print("air_toggle.pic2=41");
if (user_acmode == 1)
{
elcd_send_stop_bit();
elcd.print("mode.pic=22");
elcd_send_stop_bit();
elcd.print("mode.pic2=22");
elcd.print("mode.pic2=34");
elcd_send_stop_bit();
}
else
@ -510,7 +510,7 @@ void update_lcd_ac()
elcd_send_stop_bit();
elcd.print("mode.pic=24");
elcd_send_stop_bit();
elcd.print("mode.pic2=24");
elcd.print("mode.pic2=36");
elcd_send_stop_bit();
}
}