Fix baudrate calculation allowing max 30600 baud

Fix baudrate calculation allowing max 30600 baud (#6294)
This commit is contained in:
Theo Arends 2019-08-27 15:44:30 +02:00
parent 022df89950
commit b661c6a414
1 changed files with 1 additions and 1 deletions

View File

@ -963,7 +963,7 @@ void CmndBaudrate(void)
{
if (XdrvMailbox.payload > 1200) {
XdrvMailbox.payload /= 1200; // Make it a valid baudrate
baudrate = XdrvMailbox.payload * 1200;
baudrate = (XdrvMailbox.payload & 0xFF) * 1200;
SetSerialBaudrate(baudrate);
}
ResponseCmndNumber(Settings.baudrate * 1200);