mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-24 20:43:32 +00:00
Shorthand values for M575 B
This commit is contained in:
parent
b94b3e6315
commit
ca8fbbc2be
@ -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…
Reference in New Issue
Block a user