Fix Serial Bridge set baudrate regression from 6.6.0.4

Fix Serial Bridge set baudrate regression from 6.6.0.4
This commit is contained in:
Theo Arends 2019-08-28 10:17:31 +02:00
parent 779faf5f39
commit 3a63ff3728
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ void CmndSSerialSend(void)
void CmndSBaudrate(void)
{
if (XdrvMailbox.payload > 1200) {
Settings.sbaudrate /= 1200; // Make it a valid baudrate
XdrvMailbox.payload /= 1200; // Make it a valid baudrate
Settings.sbaudrate = XdrvMailbox.payload;
SerialBridgeSerial->begin(Settings.sbaudrate * 1200); // Reinitialize serial port with new baud rate
}
ResponseCmndNumber(Settings.sbaudrate * 1200);