Browse Source

Merge pull request #9132 from Bob-the-Kuhn/add-VIKI2-to-Travis

[2.0.x] add VIKI2 test to Travis & fix LCD contrast (again)
Bob-the-Kuhn 6 years ago
parent
commit
da600e5fbe
No account linked to committer's email address

+ 9
- 0
.travis.yml View File

438
   - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
438
   - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
439
   - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
439
   - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
440
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
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
     #endif
3166
     #endif
3167
 
3167
 
3168
     #if HAS_LCD_CONTRAST
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
       MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
3170
       MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
3170
     #endif
3171
     #endif
3171
     #if ENABLED(FWRETRACT)
3172
     #if ENABLED(FWRETRACT)
5243
 
5244
 
5244
 #if HAS_LCD_CONTRAST
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
     lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
5248
     lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
5248
     u8g.setContrast(lcd_contrast);
5249
     u8g.setContrast(lcd_contrast);
5249
   }
5250
   }

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

84
   #endif
84
   #endif
85
 
85
 
86
   #if ENABLED(DOGLCD)
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
   #endif
89
   #endif
90
 
90
 
91
   #if ENABLED(SHOW_BOOTSCREEN)
91
   #if ENABLED(SHOW_BOOTSCREEN)

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

230
 
230
 
231
 #include "utf_mapper.h"
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
 static char currentfont = 0;
234
 static char currentfont = 0;
235
 
235
 
236
 // The current graphical page being rendered
236
 // The current graphical page being rendered

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

189
   //
189
   //
190
   // HAS_LCD_CONTRAST
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
   // FWRETRACT
195
   // FWRETRACT
596
     _FIELD_TEST(lcd_contrast);
596
     _FIELD_TEST(lcd_contrast);
597
 
597
 
598
     #if !HAS_LCD_CONTRAST
598
     #if !HAS_LCD_CONTRAST
599
-      const uint16_t lcd_contrast = 32;
599
+      const int16_t lcd_contrast = 32;
600
     #endif
600
     #endif
601
     EEPROM_WRITE(lcd_contrast);
601
     EEPROM_WRITE(lcd_contrast);
602
 
602
 
1143
       _FIELD_TEST(lcd_contrast);
1143
       _FIELD_TEST(lcd_contrast);
1144
 
1144
 
1145
       #if !HAS_LCD_CONTRAST
1145
       #if !HAS_LCD_CONTRAST
1146
-        uint16_t lcd_contrast;
1146
+        int16_t lcd_contrast;
1147
       #endif
1147
       #endif
1148
       EEPROM_READ(lcd_contrast);
1148
       EEPROM_READ(lcd_contrast);
1149
 
1149
 

Loading…
Cancel
Save