mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-30 22:26:35 +00:00
Fix baudrate calculation allowing max 30600 baud
Fix baudrate calculation allowing max 30600 baud (#6294)
This commit is contained in:
parent
022df89950
commit
b661c6a414
@ -963,7 +963,7 @@ void CmndBaudrate(void)
|
|||||||
{
|
{
|
||||||
if (XdrvMailbox.payload > 1200) {
|
if (XdrvMailbox.payload > 1200) {
|
||||||
XdrvMailbox.payload /= 1200; // Make it a valid baudrate
|
XdrvMailbox.payload /= 1200; // Make it a valid baudrate
|
||||||
baudrate = XdrvMailbox.payload * 1200;
|
baudrate = (XdrvMailbox.payload & 0xFF) * 1200;
|
||||||
SetSerialBaudrate(baudrate);
|
SetSerialBaudrate(baudrate);
|
||||||
}
|
}
|
||||||
ResponseCmndNumber(Settings.baudrate * 1200);
|
ResponseCmndNumber(Settings.baudrate * 1200);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user