Commit af43a67 1 parent 7b163cf commit af43a67 Copy full SHA for af43a67
File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3936,6 +3936,7 @@ extern uint8_t st_backlash_y;
3936
3936
//!@n M114 - Output current position to serial port
3937
3937
//!@n M115 - Capabilities string
3938
3938
//!@n M117 - display message
3939
+ //!@n M118 - Serial print
3939
3940
//!@n M119 - Output Endstop status to serial port
3940
3941
//!@n M123 - Tachometer value
3941
3942
//!@n M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
@@ -6512,6 +6513,31 @@ SERIAL_PROTOCOLPGM("\n\n");
6512
6513
}
6513
6514
break;
6514
6515
6516
+ /*!
6517
+ ### M118 - Serial print <a href="https://reprap.org/wiki/G-code#M118:_Echo_message_on_host">M118: Serial print</a>
6518
+ */
6519
+ case 118: {
6520
+ bool hasE, hasA = false;
6521
+ char *p = strchr_pointer;
6522
+
6523
+ for (uint8_t i = 2; i--;) {
6524
+ // A1, E1, and Pn are always parsed out
6525
+ if (!((p[0] == 'A' || p[0] == 'E') && p[1] == '1')) break;
6526
+ switch (p[0]) {
6527
+ case 'A': hasA = true; break;
6528
+ case 'E': hasE = true; break;
6529
+ }
6530
+ p += 2;
6531
+ while (*p == ' ') ++p;
6532
+ }
6533
+
6534
+ if (hasE) SERIAL_ECHO_START;
6535
+ if (hasA) SERIAL_ECHO("//");
6536
+
6537
+ SERIAL_ECHOLN(p);
6538
+ }
6539
+ break;
6540
+
6515
6541
#ifdef M120_M121_ENABLED
6516
6542
/*!
6517
6543
### M120 - Enable endstops <a href="https://reprap.org/wiki/G-code#M120:_Enable_endstop_detection">M120: Enable endstop detection</a>
You can’t perform that action at this time.
0 commit comments