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)
pull/1/head
Bob-the-Kuhn 7 years ago
committed by GitHub
parent
commit
da600e5fbe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      .travis.yml
  2. 3
      Marlin/src/lcd/ultralcd.cpp
  3. 4
      Marlin/src/lcd/ultralcd.h
  4. 2
      Marlin/src/lcd/ultralcd_impl_DOGM.h
  5. 6
      Marlin/src/module/configuration_store.cpp

9
.travis.yml

@ -438,3 +438,12 @@ script:
- cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
- cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
#
# Enable VIKI2, SDSUPPORT
#
- restore_configs
- opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
- cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
- cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
- opt_enable VIKI2 SDSUPPORT
- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}

3
Marlin/src/lcd/ultralcd.cpp

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

4
Marlin/src/lcd/ultralcd.h

@ -84,8 +84,8 @@
#endif #endif
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
extern uint16_t lcd_contrast; extern int16_t lcd_contrast;
void set_lcd_contrast(const uint16_t value); void set_lcd_contrast(const int16_t value);
#endif #endif
#if ENABLED(SHOW_BOOTSCREEN) #if ENABLED(SHOW_BOOTSCREEN)

2
Marlin/src/lcd/ultralcd_impl_DOGM.h

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

6
Marlin/src/module/configuration_store.cpp

@ -189,7 +189,7 @@ typedef struct SettingsDataStruct {
// //
// HAS_LCD_CONTRAST // HAS_LCD_CONTRAST
// //
uint16_t lcd_contrast; // M250 C int16_t lcd_contrast; // M250 C
// //
// FWRETRACT // FWRETRACT
@ -596,7 +596,7 @@ void MarlinSettings::postprocess() {
_FIELD_TEST(lcd_contrast); _FIELD_TEST(lcd_contrast);
#if !HAS_LCD_CONTRAST #if !HAS_LCD_CONTRAST
const uint16_t lcd_contrast = 32; const int16_t lcd_contrast = 32;
#endif #endif
EEPROM_WRITE(lcd_contrast); EEPROM_WRITE(lcd_contrast);
@ -1143,7 +1143,7 @@ void MarlinSettings::postprocess() {
_FIELD_TEST(lcd_contrast); _FIELD_TEST(lcd_contrast);
#if !HAS_LCD_CONTRAST #if !HAS_LCD_CONTRAST
uint16_t lcd_contrast; int16_t lcd_contrast;
#endif #endif
EEPROM_READ(lcd_contrast); EEPROM_READ(lcd_contrast);

Loading…
Cancel
Save