Browse Source

Merge pull request #10498 from xC0000005/MalyanLCDFix

Fix overridden Malyan LCD functions
Scott Lahteine 7 years ago
parent
commit
8177c4334e
No account linked to committer's email address
2 changed files with 29 additions and 6 deletions
  1. 8
    6
      Marlin/src/lcd/ultralcd.h
  2. 21
    0
      platformio.ini

+ 8
- 6
Marlin/src/lcd/ultralcd.h View File

28
 #if ENABLED(ULTRA_LCD) || ENABLED(MALYAN_LCD)
28
 #if ENABLED(ULTRA_LCD) || ENABLED(MALYAN_LCD)
29
   void lcd_init();
29
   void lcd_init();
30
   bool lcd_detected();
30
   bool lcd_detected();
31
+  void lcd_update();
32
+  void lcd_setalertstatusPGM(const char* message);
33
+#else
34
+  inline void lcd_init() {}
35
+  inline bool lcd_detected() { return true; }
36
+  inline void lcd_update() {}
37
+  inline void lcd_setalertstatusPGM(const char* message) { UNUSED(message); }
31
 #endif
38
 #endif
32
 
39
 
33
 #if ENABLED(ULTRA_LCD)
40
 #if ENABLED(ULTRA_LCD)
52
     constexpr bool lcd_wait_for_move = false;
59
     constexpr bool lcd_wait_for_move = false;
53
   #endif
60
   #endif
54
 
61
 
55
-  void lcd_update();
56
   bool lcd_hasstatus();
62
   bool lcd_hasstatus();
57
   void lcd_setstatus(const char* message, const bool persist=false);
63
   void lcd_setstatus(const char* message, const bool persist=false);
58
   void lcd_setstatusPGM(const char* message, const int8_t level=0);
64
   void lcd_setstatusPGM(const char* message, const int8_t level=0);
230
     void wait_for_release();
236
     void wait_for_release();
231
   #endif
237
   #endif
232
 
238
 
233
-#else // no LCD
239
+#else // MALYAN_LCD or no LCD
234
 
240
 
235
   constexpr bool lcd_wait_for_move = false;
241
   constexpr bool lcd_wait_for_move = false;
236
 
242
 
237
-  inline void lcd_init() {}
238
-  inline bool lcd_detected() { return true; }
239
-  inline void lcd_update() {}
240
   inline void lcd_refresh() {}
243
   inline void lcd_refresh() {}
241
   inline void lcd_buttons_update() {}
244
   inline void lcd_buttons_update() {}
242
   inline bool lcd_hasstatus() { return false; }
245
   inline bool lcd_hasstatus() { return false; }
243
   inline void lcd_setstatus(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); }
246
   inline void lcd_setstatus(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); }
244
   inline void lcd_setstatusPGM(const char* const message, const int8_t level=0) { UNUSED(message); UNUSED(level); }
247
   inline void lcd_setstatusPGM(const char* const message, const int8_t level=0) { UNUSED(message); UNUSED(level); }
245
   inline void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) { UNUSED(level); UNUSED(fmt); }
248
   inline void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) { UNUSED(level); UNUSED(fmt); }
246
-  inline void lcd_setalertstatusPGM(const char* message) { UNUSED(message); }
247
   inline void lcd_reset_alert_level() {}
249
   inline void lcd_reset_alert_level() {}
248
   inline void lcd_reset_status() {}
250
   inline void lcd_reset_status() {}
249
 
251
 

+ 21
- 0
platformio.ini View File

282
 lib_ignore   = Adafruit NeoPixel
282
 lib_ignore   = Adafruit NeoPixel
283
 src_filter   = ${common.default_src_filter}
283
 src_filter   = ${common.default_src_filter}
284
 monitor_baud = 250000
284
 monitor_baud = 250000
285
+
286
+[env:malyanm200]
287
+platform    = ststm32
288
+framework   = arduino
289
+board = malyanM200
290
+build_flags = !python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py -DMCU_STM32F103CB -D __STM32F1__=1 -std=c++1y -D MOTHERBOARD="BOARD_MALYAN_M200" -DSERIAL_USB -ffunction-sections -fdata-sections -Wl,--gc-sections
291
+src_filter = ${common.default_src_filter}
292
+#-<frameworks>
293
+lib_ignore =
294
+  U8glib
295
+  LiquidCrystal_I2C
296
+  LiquidCrystal
297
+  NewliquidCrystal
298
+  LiquidTWI2
299
+  Adafruit NeoPixel
300
+  TMC2130Stepper
301
+  Servo(STM32F1)
302
+  TMC26XStepper
303
+  U8glib-HAL
304
+  TMC2208Stepper
305
+  c1921b4

Loading…
Cancel
Save