Quellcode durchsuchen

Fix Malyan M200 config and protocol (#14394)

J.C. Nelson vor 5 Jahren
Ursprung
Commit
30a3db4f22
2 geänderte Dateien mit 8 neuen und 11 gelöschten Zeilen
  1. 6
    9
      Marlin/src/lcd/extui_malyan_lcd.cpp
  2. 2
    2
      config/examples/Malyan/M200/Configuration.h

+ 6
- 9
Marlin/src/lcd/extui_malyan_lcd.cpp Datei anzeigen

@@ -113,7 +113,8 @@ void write_to_lcd(const char * const message) {
113 113
  */
114 114
 void process_lcd_c_command(const char* command) {
115 115
   switch (command[0]) {
116
-    case 'C': {
116
+    case 'C': // Cope with both V1 early rev and later LCDs.
117
+    case 'S': {
117 118
       int raw_feedrate = atoi(command + 1);
118 119
       feedrate_percentage = raw_feedrate * 10;
119 120
       feedrate_percentage = constrain(feedrate_percentage, 10, 999);
@@ -319,11 +320,6 @@ void process_lcd_s_command(const char* command) {
319 320
       write_to_lcd(message_buffer);
320 321
     } break;
321 322
 
322
-    case 'H':
323
-      // Home all axis
324
-      queue.inject_P(PSTR("G28"));
325
-      break;
326
-
327 323
     case 'L': {
328 324
       #if ENABLED(SDSUPPORT)
329 325
         if (!card.isDetected()) card.initsd();
@@ -474,14 +470,15 @@ namespace ExtUI {
474 470
     #endif
475 471
   }
476 472
 
477
-  void onStatusChanged(const char * const msg) {
473
+  // {E:<msg>} is for error states.
474
+  void onPrinterKilled(PGM_P msg) {
478 475
     write_to_lcd_P(PSTR("{E:"));
479
-    write_to_lcd(msg);
476
+    write_to_lcd_P(msg);
480 477
     write_to_lcd_P("}");
481 478
   }
482 479
 
483 480
   // Not needed for Malyan LCD
484
-  void onPrinterKilled(PGM_P const msg) { UNUSED(msg); }
481
+  void onStatusChanged(const char * const msg) { UNUSED(msg); }
485 482
   void onMediaInserted() {};
486 483
   void onMediaError() {};
487 484
   void onMediaRemoved() {};

+ 2
- 2
config/examples/Malyan/M200/Configuration.h Datei anzeigen

@@ -104,7 +104,7 @@
104 104
  *
105 105
  * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
106 106
  */
107
-#define SERIAL_PORT 0
107
+#define SERIAL_PORT -1
108 108
 
109 109
 /**
110 110
  * Select a secondary serial port on the board to use for communication with the host.
@@ -132,7 +132,7 @@
132 132
 // The following define selects which electronics board you have.
133 133
 // Please choose the name from boards.h that matches your setup
134 134
 #ifndef MOTHERBOARD
135
-  #define MOTHERBOARD BOARD_RAMPS_14_EFB
135
+  #define MOTHERBOARD BOARD_MALYAN_M200
136 136
 #endif
137 137
 
138 138
 // Optional custom name for your RepStrap or other custom machine

Laden…
Abbrechen
Speichern