Fix Malyan M200 config and protocol (#14394)
This commit is contained in:
parent
8c55bd5451
commit
30a3db4f22
2 changed files with 8 additions and 11 deletions
|
@ -113,7 +113,8 @@ void write_to_lcd(const char * const message) {
|
|||
*/
|
||||
void process_lcd_c_command(const char* command) {
|
||||
switch (command[0]) {
|
||||
case 'C': {
|
||||
case 'C': // Cope with both V1 early rev and later LCDs.
|
||||
case 'S': {
|
||||
int raw_feedrate = atoi(command + 1);
|
||||
feedrate_percentage = raw_feedrate * 10;
|
||||
feedrate_percentage = constrain(feedrate_percentage, 10, 999);
|
||||
|
@ -319,11 +320,6 @@ void process_lcd_s_command(const char* command) {
|
|||
write_to_lcd(message_buffer);
|
||||
} break;
|
||||
|
||||
case 'H':
|
||||
// Home all axis
|
||||
queue.inject_P(PSTR("G28"));
|
||||
break;
|
||||
|
||||
case 'L': {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
if (!card.isDetected()) card.initsd();
|
||||
|
@ -474,14 +470,15 @@ namespace ExtUI {
|
|||
#endif
|
||||
}
|
||||
|
||||
void onStatusChanged(const char * const msg) {
|
||||
// {E:<msg>} is for error states.
|
||||
void onPrinterKilled(PGM_P msg) {
|
||||
write_to_lcd_P(PSTR("{E:"));
|
||||
write_to_lcd(msg);
|
||||
write_to_lcd_P(msg);
|
||||
write_to_lcd_P("}");
|
||||
}
|
||||
|
||||
// Not needed for Malyan LCD
|
||||
void onPrinterKilled(PGM_P const msg) { UNUSED(msg); }
|
||||
void onStatusChanged(const char * const msg) { UNUSED(msg); }
|
||||
void onMediaInserted() {};
|
||||
void onMediaError() {};
|
||||
void onMediaRemoved() {};
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
*
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
#define SERIAL_PORT 0
|
||||
#define SERIAL_PORT -1
|
||||
|
||||
/**
|
||||
* Select a secondary serial port on the board to use for communication with the host.
|
||||
|
@ -132,7 +132,7 @@
|
|||
// The following define selects which electronics board you have.
|
||||
// Please choose the name from boards.h that matches your setup
|
||||
#ifndef MOTHERBOARD
|
||||
#define MOTHERBOARD BOARD_RAMPS_14_EFB
|
||||
#define MOTHERBOARD BOARD_MALYAN_M200
|
||||
#endif
|
||||
|
||||
// Optional custom name for your RepStrap or other custom machine
|
||||
|
|
Reference in a new issue