@@ -801,10 +801,10 @@ void update_display(){
801
801
DISPLAY_buffer [2 ] = 32 ;
802
802
DISPLAY_buffer [3 ] = 32 ;
803
803
}
804
- LCD_PutStr (14 , 35 , DISPLAY_buffer , FONT_arial_36X44_NUMBERS , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
804
+ LCD_PutStr (64 , 35 , DISPLAY_buffer , FONT_arial_36X44_NUMBERS , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
805
805
806
806
if (cartridge_state == DETACHED ) {
807
- LCD_PutStr (10 , 120 , " --- " , FONT_arial_36X44_NUMBERS , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
807
+ LCD_PutStr (60 , 115 , " --- " , FONT_arial_36X44_NUMBERS , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
808
808
}
809
809
else {
810
810
memset (& DISPLAY_buffer , '\0' , sizeof (DISPLAY_buffer ));
@@ -813,12 +813,12 @@ void update_display(){
813
813
DISPLAY_buffer [2 ] = 32 ;
814
814
DISPLAY_buffer [3 ] = 32 ;
815
815
}
816
- LCD_PutStr (14 , 120 , DISPLAY_buffer , FONT_arial_36X44_NUMBERS , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
816
+ LCD_PutStr (64 , 115 , DISPLAY_buffer , FONT_arial_36X44_NUMBERS , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
817
817
}
818
818
819
819
memset (& DISPLAY_buffer , '\0' , sizeof (DISPLAY_buffer ));
820
820
sprintf (DISPLAY_buffer , "%.1f" , sensor_values .bus_voltage );
821
- LCD_PutStr (120 , 200 , DISPLAY_buffer , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
821
+ LCD_PutStr (170 , 195 , DISPLAY_buffer , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
822
822
823
823
memset (& DISPLAY_buffer , '\0' , sizeof (DISPLAY_buffer ));
824
824
if (convert_temperature (sensor_values .mcu_temperature ) < 99.5 ){
@@ -827,44 +827,52 @@ void update_display(){
827
827
else {
828
828
sprintf (DISPLAY_buffer , "%.0f" , convert_temperature (sensor_values .mcu_temperature ));
829
829
}
830
- LCD_PutStr (52 , 220 , DISPLAY_buffer , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
830
+ LCD_PutStr (102 , 215 , DISPLAY_buffer , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
831
831
832
832
if (attached_handle == T210 ){
833
- LCD_PutStr (120 , 180 , "T210 " , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
833
+ LCD_PutStr (170 , 175 , "T210 " , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
834
834
}
835
835
else if (attached_handle == T245 ){
836
- LCD_PutStr (120 , 180 , "T245 " , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
836
+ LCD_PutStr (170 , 175 , "T245 " , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
837
837
}
838
838
else if (attached_handle == NT115 ){
839
- LCD_PutStr (120 , 180 , "NT115" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
839
+ LCD_PutStr (170 , 175 , "NT115" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
840
840
}
841
841
842
+ if (sensor_values .max_power_watt < 100 ){
843
+ sprintf (DISPLAY_buffer , "%.0f W " , sensor_values .max_power_watt );
844
+ }
845
+ else {
846
+ sprintf (DISPLAY_buffer , "%.0f W" , sensor_values .max_power_watt );
847
+ }
848
+ LCD_PutStr (2 , 10 , DISPLAY_buffer , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
849
+
842
850
if ((sensor_values .current_state == SLEEP || sensor_values .current_state == EMERGENCY_SLEEP || sensor_values .current_state == HALTED ) && !sleep_state_written_to_LCD ){
843
- UG_FillFrame (290 , 12 , 310 , 229 , RGB_to_BRG (C_ORANGE ));
844
- LCD_PutStr (294 , 6 , "Z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
845
- LCD_PutStr (296 , 41 , "z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
846
- LCD_PutStr (294 , 76 , "Z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
847
- LCD_PutStr (296 , 111 , "z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
848
- LCD_PutStr (294 , 146 , "Z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
849
- LCD_PutStr (296 , 181 , "z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
851
+ UG_FillFrame (10 , 32 , 30 , 209 , RGB_to_BRG (C_ORANGE ));
852
+ LCD_PutStr (14 , 41 , "Z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
853
+ LCD_PutStr (16 , 68 , "z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
854
+ LCD_PutStr (14 , 95 , "Z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
855
+ LCD_PutStr (16 , 122 , "z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
856
+ LCD_PutStr (14 , 149 , "Z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
857
+ LCD_PutStr (16 , 176 , "z" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
850
858
sleep_state_written_to_LCD = 1 ;
851
859
standby_state_written_to_LCD = 0 ;
852
860
}
853
861
else if ((sensor_values .current_state == STANDBY ) && !standby_state_written_to_LCD ){
854
- UG_FillFrame (290 , 12 , 310 , 229 , RGB_to_BRG (C_ORANGE ));
855
- LCD_PutStr (294 , 6 , "S" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
856
- LCD_PutStr (294 , 35 , "T" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
857
- LCD_PutStr (294 , 64 , "A" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
858
- LCD_PutStr (294 , 93 , "N" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
859
- LCD_PutStr (294 , 122 , "D" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
860
- LCD_PutStr (294 , 151 , "B" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
861
- LCD_PutStr (294 , 180 , "Y" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
862
+ UG_FillFrame (10 , 32 , 30 , 209 , RGB_to_BRG (C_ORANGE ));
863
+ LCD_PutStr (14 , 41 , "S" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
864
+ LCD_PutStr (14 , 63 , "T" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
865
+ LCD_PutStr (14 , 85 , "A" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
866
+ LCD_PutStr (14 , 107 , "N" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
867
+ LCD_PutStr (14 , 129 , "D" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
868
+ LCD_PutStr (14 , 151 , "B" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
869
+ LCD_PutStr (14 , 173 , "Y" , FONT_arial_20X23 , RGB_to_BRG (C_BLACK ), RGB_to_BRG (C_ORANGE ));
862
870
standby_state_written_to_LCD = 1 ;
863
871
sleep_state_written_to_LCD = 0 ;
864
872
}
865
873
else if (sensor_values .current_state == RUN ){
866
- UG_FillFrame (290 , 229 - (sensor_values .requested_power_filtered /PID_MAX_OUTPUT )* 217 , 310 , 229 , RGB_to_BRG (C_LIGHT_SKY_BLUE ));
867
- UG_FillFrame (290 , 12 , 310 , 229 - (sensor_values .requested_power_filtered /PID_MAX_OUTPUT )* 217 , RGB_to_BRG (C_BLACK ));
874
+ UG_FillFrame (10 , 209 - (sensor_values .requested_power_filtered /PID_MAX_OUTPUT )* 177 , 30 , 209 , RGB_to_BRG (C_LIGHT_SKY_BLUE ));
875
+ UG_FillFrame (10 , 32 , 30 , 209 - (sensor_values .requested_power_filtered /PID_MAX_OUTPUT )* 177 , RGB_to_BRG (C_BLACK ));
868
876
standby_state_written_to_LCD = 0 ;
869
877
sleep_state_written_to_LCD = 0 ;
870
878
}
@@ -940,71 +948,83 @@ void LCD_draw_main_screen(){
940
948
UG_DrawFrame (208 , 64 , 232 , 270 , RGB_to_BRG (C_WHITE ));
941
949
UG_DrawFrame (209 , 65 , 231 , 269 , RGB_to_BRG (C_WHITE ));
942
950
943
- LCD_PutStr (205 , 275 , "0 W" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
951
+ LCD_PutStr (2 , 275 , "0 W" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
944
952
}
945
953
else {
946
954
UG_FillScreen (RGB_to_BRG (C_BLACK ));
955
+ LCD_PutStr (165 , 10 , "AxxSolder" , FONT_arial_20X23 , RGB_to_BRG (C_YELLOW ), RGB_to_BRG (C_BLACK ));
947
956
948
- LCD_PutStr (14 , 10 , "Set temp" , FONT_arial_20X23 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
949
- UG_DrawCircle (123 , 41 , 5 , RGB_to_BRG (C_WHITE ));
950
- UG_DrawCircle (123 , 41 , 4 , RGB_to_BRG (C_WHITE ));
951
- UG_DrawCircle (123 , 41 , 3 , RGB_to_BRG (C_WHITE ));
957
+ LCD_PutStr (64 , 10 , "Set temp" , FONT_arial_20X23 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
958
+ UG_DrawCircle (173 , 41 , 5 , RGB_to_BRG (C_WHITE ));
959
+ UG_DrawCircle (173 , 41 , 4 , RGB_to_BRG (C_WHITE ));
960
+ UG_DrawCircle (173 , 41 , 3 , RGB_to_BRG (C_WHITE ));
952
961
if (flash_values .deg_celsius == 1 ){
953
- LCD_PutStr (130 , 35 , "C" , FONT_arial_36X44_C , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
962
+ LCD_PutStr (180 , 35 , "C" , FONT_arial_36X44_C , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
954
963
}
955
964
else {
956
- LCD_PutStr (130 , 35 , "F" , FONT_arial_36X44_F , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
965
+ LCD_PutStr (180 , 35 , "F" , FONT_arial_36X44_F , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
957
966
}
958
- LCD_PutStr (14 , 95 , "Actual temp" , FONT_arial_20X23 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
959
- UG_DrawCircle (123 , 126 , 5 , RGB_to_BRG (C_WHITE ));
960
- UG_DrawCircle (123 , 126 , 4 , RGB_to_BRG (C_WHITE ));
961
- UG_DrawCircle (123 , 126 , 3 , RGB_to_BRG (C_WHITE ));
967
+ LCD_PutStr (64 , 90 , "Actual temp" , FONT_arial_20X23 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
968
+ UG_DrawCircle (173 , 121 , 5 , RGB_to_BRG (C_WHITE ));
969
+ UG_DrawCircle (173 , 121 , 4 , RGB_to_BRG (C_WHITE ));
970
+ UG_DrawCircle (173 , 121 , 3 , RGB_to_BRG (C_WHITE ));
962
971
if (flash_values .deg_celsius == 1 ){
963
- LCD_PutStr (130 , 120 , "C" , FONT_arial_36X44_C , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
972
+ LCD_PutStr (180 , 115 , "C" , FONT_arial_36X44_C , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
964
973
}
965
974
else {
966
- LCD_PutStr (130 , 120 , "F" , FONT_arial_36X44_F , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
975
+ LCD_PutStr (180 , 115 , "F" , FONT_arial_36X44_F , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
967
976
}
968
977
969
- UG_DrawFrame (6 , 89 , 182 , 175 , RGB_to_BRG (C_WHITE ));
970
- UG_DrawFrame (5 , 88 , 183 , 176 , RGB_to_BRG (C_WHITE ));
978
+ UG_DrawFrame (56 , 84 , 232 , 170 , RGB_to_BRG (C_WHITE ));
979
+ UG_DrawFrame (56 , 83 , 233 , 171 , RGB_to_BRG (C_WHITE ));
971
980
972
- LCD_PutStr (6 , 180 , "Handle type:" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
973
- LCD_PutStr (6 , 200 , "Input voltage: V" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
981
+ LCD_PutStr (56 , 175 , "Handle type:" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
982
+ LCD_PutStr (56 , 195 , "Input voltage: V" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
974
983
if (flash_values .deg_celsius == 1 ){
975
- LCD_PutStr (6 , 220 , "MCU: °C" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
984
+ LCD_PutStr (56 , 215 , "MCU: °C" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
976
985
}
977
986
else {
978
- LCD_PutStr (6 , 220 , "MCU: °F" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
987
+ LCD_PutStr (56 , 215 , "MCU: °F" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
979
988
}
980
- LCD_PutStr (110 , 220 , "SRC:" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
989
+ LCD_PutStr (160 , 215 , "SRC:" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
981
990
switch (power_source ){
982
991
case POWER_DC :
983
- LCD_PutStr (160 , 220 , "DC" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
992
+ LCD_PutStr (210 , 215 , "DC" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
984
993
break ;
985
994
case POWER_USB :
986
- LCD_PutStr (160 , 220 , "USB" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
995
+ LCD_PutStr (210 , 215 , "USB" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
987
996
break ;
988
997
case POWER_BAT :
989
- LCD_PutStr (160 , 220 , "BAT" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
998
+ LCD_PutStr (210 , 215 , "BAT" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
990
999
break ;
991
1000
}
992
1001
993
- /*
994
- UG_DrawLine(20, 0, 20, 220, RGB_to_BRG(C_DARK_SEA_GREEN));
995
- UG_DrawLine(21, 0, 21, 220, RGB_to_BRG(C_DARK_SEA_GREEN));
996
1002
997
- LCD_PutStr(6, 271, "PRESETS", FONT_arial_20X23, RGB_to_BRG(C_DARK_SEA_GREEN), RGB_to_BRG(C_BLACK));
1003
+ UG_DrawLine (265 , 0 , 265 , 240 , RGB_to_BRG (C_DARK_SEA_GREEN ));
1004
+ UG_DrawLine (266 , 0 , 266 , 240 , RGB_to_BRG (C_DARK_SEA_GREEN ));
1005
+ UG_DrawLine (315 , 0 , 315 , 240 , RGB_to_BRG (C_DARK_SEA_GREEN ));
1006
+ UG_DrawLine (316 , 0 , 316 , 240 , RGB_to_BRG (C_DARK_SEA_GREEN ));
1007
+
1008
+ LCD_PutStr (285 , 75 , "P" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1009
+ LCD_PutStr (285 , 97 , "R" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1010
+ LCD_PutStr (285 , 119 , "E" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1011
+ LCD_PutStr (285 , 141 , "S" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1012
+ LCD_PutStr (285 , 163 , "E" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1013
+ LCD_PutStr (285 , 185 , "T" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1014
+ LCD_PutStr (285 , 207 , "S" , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
998
1015
memset (& DISPLAY_buffer , '\0' , sizeof (DISPLAY_buffer ));
999
1016
sprintf (DISPLAY_buffer , "%.0f" , flash_values .preset_temp_1 );
1000
- LCD_PutStr(130, 301 , DISPLAY_buffer, FONT_arial_20X23, RGB_to_BRG(C_DARK_SEA_GREEN), RGB_to_BRG(C_BLACK));
1017
+ LCD_PutStr (272 , 40 , DISPLAY_buffer , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1001
1018
memset (& DISPLAY_buffer , '\0' , sizeof (DISPLAY_buffer ));
1002
1019
sprintf (DISPLAY_buffer , "%.0f" , flash_values .preset_temp_2 );
1003
- LCD_PutStr(190, 271, DISPLAY_buffer, FONT_arial_20X23, RGB_to_BRG(C_DARK_SEA_GREEN), RGB_to_BRG(C_BLACK));
1004
- */
1020
+ LCD_PutStr (272 , 10 , DISPLAY_buffer , FONT_arial_20X23 , RGB_to_BRG (C_DARK_SEA_GREEN ), RGB_to_BRG (C_BLACK ));
1021
+
1022
+
1023
+ UG_DrawFrame (8 , 30 , 32 , 212 , RGB_to_BRG (C_WHITE ));
1024
+ UG_DrawFrame (9 , 31 , 31 , 211 , RGB_to_BRG (C_WHITE ));
1025
+
1026
+ LCD_PutStr (5 , 215 , "0 W" , FONT_arial_17X18 , RGB_to_BRG (C_WHITE ), RGB_to_BRG (C_BLACK ));
1005
1027
1006
- UG_DrawFrame (288 , 10 , 312 , 232 , RGB_to_BRG (C_WHITE ));
1007
- UG_DrawFrame (289 , 11 , 311 , 231 , RGB_to_BRG (C_WHITE ));
1008
1028
}
1009
1029
}
1010
1030
0 commit comments