File tree Expand file tree Collapse file tree 5 files changed +1812
-1793
lines changed Expand file tree Collapse file tree 5 files changed +1812
-1793
lines changed Original file line number Diff line number Diff line change @@ -901,8 +901,13 @@ uint8_t max_value;
901901 color [c_num ] &= max_value ;
902902 if (xcol == 0 ) {
903903 // foreground color
904+ #ifdef LCD_ICON_COLOR
905+ lcd_fg2_color .b [1 ] = (color [0 ] << 3 ) | (color [1 ] >> 3 );
906+ lcd_fg2_color .b [0 ] = ((color [1 ] & 7 ) << 5 ) | (color [2 ] & 0x1f );
907+ #else
904908 lcd_fg_color .b [1 ] = (color [0 ] << 3 ) | (color [1 ] >> 3 );
905909 lcd_fg_color .b [0 ] = ((color [1 ] & 7 ) << 5 ) | (color [2 ] & 0x1f );
910+ #endif
906911 } else {
907912 lcd_bg_color .b [1 ] = (color [0 ] << 3 ) | (color [1 ] >> 3 );
908913 lcd_bg_color .b [0 ] = ((color [1 ] & 7 ) << 5 ) | (color [2 ] & 0x1f );
@@ -923,8 +928,13 @@ uint8_t max_value;
923928
924929// eeprom_write_byte((uint8_t *)(&EE_Volume_Value), (int8_t)contrast); // save contrast value
925930 if (xcol == 0 ) {
931+ #ifdef LCD_ICON_COLOR
932+ eeprom_write_byte ((uint8_t * )(& EE_FG_COLOR1 ), (int8_t )lcd_fg2_color .b [0 ]);
933+ eeprom_write_byte ((uint8_t * )(& EE_FG_COLOR2 ), (int8_t )lcd_fg2_color .b [1 ]);
934+ #else
926935 eeprom_write_byte ((uint8_t * )(& EE_FG_COLOR1 ), (int8_t )lcd_fg_color .b [0 ]);
927936 eeprom_write_byte ((uint8_t * )(& EE_FG_COLOR2 ), (int8_t )lcd_fg_color .b [1 ]);
937+ #endif
928938 } else {
929939 eeprom_write_byte ((uint8_t * )(& EE_BG_COLOR1 ), (int8_t )lcd_bg_color .b [0 ]);
930940 eeprom_write_byte ((uint8_t * )(& EE_BG_COLOR2 ), (int8_t )lcd_bg_color .b [1 ]);
Original file line number Diff line number Diff line change @@ -302,8 +302,7 @@ void lcd_data(unsigned char temp1) {
302302
303303#ifdef LCD_ICON_COLOR
304304 #ifdef LCD_CHANGE_COLOR
305- lcd_fg_color .b [0 ] = eeprom_read_byte (& EE_FG_COLOR1 );
306- lcd_fg_color .b [1 ] = eeprom_read_byte (& EE_FG_COLOR2 );
305+ lcd_fg_color .w = lcd_fg2_color .w ;
307306 #else
308307 lcd_fg_color .w = LCD_FG_COLOR ;
309308 #endif
@@ -587,7 +586,10 @@ void lcd_init(void) {
587586 #ifdef LCD_CHANGE_COLOR
588587 lcd_bg_color .b [0 ] = eeprom_read_byte (& EE_BG_COLOR1 );
589588 lcd_bg_color .b [1 ] = eeprom_read_byte (& EE_BG_COLOR2 );
590- #ifndef LCD_ICON_COLOR
589+ #ifdef LCD_ICON_COLOR
590+ lcd_fg2_color .b [0 ] = eeprom_read_byte (& EE_FG_COLOR1 );
591+ lcd_fg2_color .b [1 ] = eeprom_read_byte (& EE_FG_COLOR2 );
592+ #else
591593 lcd_fg_color .b [0 ] = eeprom_read_byte (& EE_FG_COLOR1 );
592594 lcd_fg_color .b [1 ] = eeprom_read_byte (& EE_FG_COLOR2 );
593595 #endif
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ CFLAGS += -DLCD_BG_COLOR=0x7800
160160CFLAGS += -DLCD_FG_COLOR=0xffff
161161
162162# You can also select a icon color (format 5 bit red, 6 bit green, 5 bit blue)
163- # If LCD_ICON_COLOR is not specified, the LCF_FG_COLOR is used
163+ # If LCD_ICON_COLOR is not specified, the LCD_FG_COLOR is used
164164CFLAGS += -DLCD_ICON_COLOR=0x03ff
165165
166166# If option WITH_LCD_ST7565 is present one of the following fonts should be
You can’t perform that action at this time.
0 commit comments