Browse Source

LCD contrast type mismatch is back

WORKS!
Bob-the-Kuhn 6 years ago
parent
commit
e633ce06c7

+ 9
- 0
.travis.yml View File

@@ -438,3 +438,12 @@ script:
438 438
   - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
439 439
   - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
440 440
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
441
+  #
442
+  # Enable VIKI2, SDSUPPORT
443
+  #
444
+  - restore_configs
445
+  - opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
446
+  - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
447
+  - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
448
+  - opt_enable VIKI2 SDSUPPORT
449
+  - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}

+ 2
- 1
Marlin/src/lcd/ultralcd.cpp View File

@@ -3166,6 +3166,7 @@ void kill_screen(const char* lcd_msg) {
3166 3166
     #endif
3167 3167
 
3168 3168
     #if HAS_LCD_CONTRAST
3169
+      // please don't remove the "(int16_t*)" - it's needed for the VIKI2 display  --- see PR #9132 before changing it
3169 3170
       MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
3170 3171
     #endif
3171 3172
     #if ENABLED(FWRETRACT)
@@ -5243,7 +5244,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
5243 5244
 
5244 5245
 #if HAS_LCD_CONTRAST
5245 5246
 
5246
-  void set_lcd_contrast(const uint16_t value) {
5247
+  void set_lcd_contrast(const int16_t value) {
5247 5248
     lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
5248 5249
     u8g.setContrast(lcd_contrast);
5249 5250
   }

+ 2
- 2
Marlin/src/lcd/ultralcd.h View File

@@ -84,8 +84,8 @@
84 84
   #endif
85 85
 
86 86
   #if ENABLED(DOGLCD)
87
-    extern uint16_t lcd_contrast;
88
-    void set_lcd_contrast(const uint16_t value);
87
+    extern int16_t lcd_contrast;
88
+    void set_lcd_contrast(const int16_t value);
89 89
   #endif
90 90
 
91 91
   #if ENABLED(SHOW_BOOTSCREEN)

+ 1
- 1
Marlin/src/lcd/ultralcd_impl_DOGM.h View File

@@ -230,7 +230,7 @@
230 230
 
231 231
 #include "utf_mapper.h"
232 232
 
233
-uint16_t lcd_contrast; // Initialized by settings.load()
233
+int16_t lcd_contrast; // Initialized by settings.load()
234 234
 static char currentfont = 0;
235 235
 
236 236
 // The current graphical page being rendered

+ 3
- 3
Marlin/src/module/configuration_store.cpp View File

@@ -189,7 +189,7 @@ typedef struct SettingsDataStruct {
189 189
   //
190 190
   // HAS_LCD_CONTRAST
191 191
   //
192
-  uint16_t lcd_contrast;                                // M250 C
192
+  int16_t lcd_contrast;                                // M250 C
193 193
 
194 194
   //
195 195
   // FWRETRACT
@@ -596,7 +596,7 @@ void MarlinSettings::postprocess() {
596 596
     _FIELD_TEST(lcd_contrast);
597 597
 
598 598
     #if !HAS_LCD_CONTRAST
599
-      const uint16_t lcd_contrast = 32;
599
+      const int16_t lcd_contrast = 32;
600 600
     #endif
601 601
     EEPROM_WRITE(lcd_contrast);
602 602
 
@@ -1143,7 +1143,7 @@ void MarlinSettings::postprocess() {
1143 1143
       _FIELD_TEST(lcd_contrast);
1144 1144
 
1145 1145
       #if !HAS_LCD_CONTRAST
1146
-        uint16_t lcd_contrast;
1146
+        int16_t lcd_contrast;
1147 1147
       #endif
1148 1148
       EEPROM_READ(lcd_contrast);
1149 1149
 

Loading…
Cancel
Save