diff --git a/ise_display/Images/mvp-v1/bootup.png b/ise_display/Images/mvp-v1/bootup.png new file mode 100644 index 0000000..0a56411 Binary files /dev/null and b/ise_display/Images/mvp-v1/bootup.png differ diff --git a/ise_display/mvp_display_v1.HMI b/ise_display/mvp_display_v1.HMI index cea307b..870d2f3 100644 Binary files a/ise_display/mvp_display_v1.HMI and b/ise_display/mvp_display_v1.HMI differ diff --git a/src/user_code.cpp b/src/user_code.cpp index ef3c22e..f548bdc 100644 --- a/src/user_code.cpp +++ b/src/user_code.cpp @@ -243,7 +243,9 @@ void update_lcd_row1() { elcd.print("row1_master.pic="); elcd.print(master_state?10:9); elcd_send_stop_bit(); - + elcd.print("row1_master.pic2="); + elcd.print(master_state?10:9); + elcd_send_stop_bit(); bool lt1_state = pwm_get_state(ROW1_LIGHT1); bool lt2_state = pwm_get_state(ROW1_LIGHT2); @@ -256,6 +258,12 @@ void update_lcd_row1() { 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_send_stop_bit(); + elcd.print("row1_lv2.pic2="); + elcd.print(lt2_state?8:7); + elcd_send_stop_bit(); } void update_lcd_row2() { @@ -265,6 +273,9 @@ void update_lcd_row2() { elcd.print("row2_master.pic="); elcd.print(master_state?12:11); elcd_send_stop_bit(); + elcd.print("row2_master.pic2="); + elcd.print(master_state?12:11); + elcd_send_stop_bit(); bool lt1_state = pwm_get_state(ROW2_LIGHT1); bool lt2_state = pwm_get_state(ROW2_LIGHT2); //also update the light1 and light2 buttons background to reflect the current state @@ -276,6 +287,12 @@ void update_lcd_row2() { elcd.print("row2_lv2.pic="); elcd.print(lt2_state?8:7); elcd_send_stop_bit(); + elcd.print("row2_lv1.pic2="); + elcd.print(lt1_state?6:5); + elcd_send_stop_bit(); + elcd.print("row2_lv2.pic2="); + elcd.print(lt2_state?8:7); + elcd_send_stop_bit(); } @@ -286,6 +303,9 @@ void update_lcd_row3() { elcd.print("row3_master.pic="); elcd.print(master_state?14:13); elcd_send_stop_bit(); + elcd.print("row3_master.pic2="); + elcd.print(master_state?14:13); + elcd_send_stop_bit(); bool lt1_state = pwm_get_state(ROW3_LIGHT1); bool lt2_state = pwm_get_state(ROW3_LIGHT2); //also update the light1 and light2 buttons background to reflect the current state @@ -297,7 +317,12 @@ void update_lcd_row3() { elcd.print("row3_lv2.pic="); elcd.print(lt2_state?8:7); elcd_send_stop_bit(); - + elcd.print("row3_lv1.pic2="); + elcd.print(lt1_state?6:5); + elcd_send_stop_bit(); + elcd.print("row3_lv2.pic2="); + elcd.print(lt2_state?8:7); + elcd_send_stop_bit(); } void update_lcd_row4() { @@ -307,6 +332,9 @@ void update_lcd_row4() { elcd.print("row4_master.pic="); elcd.print(master_state?16:15); elcd_send_stop_bit(); + elcd.print("row4_master.pic2="); + elcd.print(master_state?16:15); + elcd_send_stop_bit(); bool lt1_state = pwm_get_state(ROW4_LIGHT1); bool lt2_state = pwm_get_state(ROW4_LIGHT2); //also update the light1 and light2 buttons background to reflect the current state @@ -318,6 +346,12 @@ void update_lcd_row4() { elcd.print("row4_lv2.pic="); elcd.print(lt2_state?8:7); elcd_send_stop_bit(); + elcd.print("row4_lv1.pic2="); + elcd.print(lt1_state?6:5); + elcd_send_stop_bit(); + elcd.print("row4_lv2.pic2="); + elcd.print(lt2_state?8:7); + elcd_send_stop_bit(); } @@ -329,6 +363,9 @@ void update_toggle_button() { elcd.print("light_toggle.pic="); elcd.print(current_state?4:3); elcd_send_stop_bit(); + elcd.print("light_toggle.pic2="); + elcd.print(current_state?4:3); + elcd_send_stop_bit(); } void update_lcd_ac() { @@ -344,26 +381,36 @@ void update_lcd_ac() { elcd_send_stop_bit(); elcd.print("fan.pic=18"); elcd_send_stop_bit(); + elcd.print("fan.pic2=18"); + elcd_send_stop_bit(); } else if(fan_speed == 1) { //fan.Set_background_image_pic(19); elcd_send_stop_bit(); elcd.print("fan.pic=19"); elcd_send_stop_bit(); + elcd.print("fan.pic2=19"); + elcd_send_stop_bit(); } else if(fan_speed == 2) { //fan.Set_background_image_pic(21); elcd_send_stop_bit(); elcd.print("fan.pic=21"); elcd_send_stop_bit(); + elcd.print("fan.pic2=21"); + elcd_send_stop_bit(); } else if(fan_speed == 3) { //fan.Set_background_image_pic(20); elcd_send_stop_bit(); elcd.print("fan.pic=20"); elcd_send_stop_bit(); + elcd.print("fan.pic2=20"); + elcd_send_stop_bit(); } else { //fan.Set_background_image_pic(18); elcd_send_stop_bit(); elcd.print("fan.pic=18"); elcd_send_stop_bit(); + elcd.print("fan.pic2=18"); + elcd_send_stop_bit(); } //update the mode cool is 22, fan mode is 24, for off the toggle button act as indicator //Mode 0: Off, 1: Cool, 2: Fan @@ -373,11 +420,17 @@ void update_lcd_ac() { elcd.print("mode.pic="); elcd.print(mode_state==1?22:24); elcd_send_stop_bit(); + elcd.print("mode.pic2="); + elcd.print(mode_state==1?22:24); + elcd_send_stop_bit(); //update the ac toggle button //ac_toggle.Set_background_image_pic(ac_get_mode()==0?1:2); elcd_send_stop_bit(); elcd.print("ac_toggle.pic="); - elcd.print(ac_get_mode()==0?1:2); + elcd.print(ac_get_mode()==0?2:1); + elcd_send_stop_bit(); + elcd.print("ac_toggle.pic2="); + elcd.print(ac_get_mode()==0?2:1); elcd_send_stop_bit(); }