Browse Source

Shorthand values for M575 B

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
f7b261a363
  1. 16
      Marlin/src/gcode/config/M575.cpp

16
Marlin/src/gcode/config/M575.cpp

@ -33,7 +33,21 @@
* B<baudrate> - Baud rate (bits per second)
*/
void GcodeSuite::M575() {
const int32_t baud = parser.ulongval('B');
int32_t baud = parser.ulongval('B');
switch (baud) {
case 24:
case 96:
case 192:
case 384:
case 576:
case 1152: baud *= 100; break;
case 250:
case 500: baud *= 1000; break;
case 19: baud = 19200; break;
case 38: baud = 38400; break;
case 57: baud = 57600; break;
case 115: baud = 115200; break;
}
switch (baud) {
case 2400: case 9600: case 19200: case 38400: case 57600:
case 115200: case 250000: case 500000: case 1000000: {

Loading…
Cancel
Save