Address Non-Standard Baud Rate Caching
Addresses https://github.com/bugst/go-serial/issues/207.
Fixes a case where read-modify-write of serial settings fails in serial.Open() and serial.Port.SetMode() when a non-standard baud rate is returned by the OS via getTermSettings, ultimately causing setTermSettings to fail with EINVAL.
@deadprogram @twpayne @fbettag @pho @cmaglie Does this PR look reasonable? Anyone on a Mac? More details in https://github.com/bugst/go-serial/issues/207
@jalius why are you @-mentioning me? I can subscribe to the notifications that I'm interested in, so why spam me?
@deadprogram @twpayne @fbettag @pho @cmaglie Does this PR look reasonable? Anyone on a Mac? More details in #207
looks reasonable.
Why not use B115200 as default value?
Why not use
B115200as default value?
I don't have a strong opinion on this. Can we make a strong case for either value as a default? In the end, the value is overwritten by the subsequent syscall in setSpecialBaudRate.
Why not use
B115200as default value?I don't have a strong opinion on this. Can we make a strong case for either value as a default? In the end, the value is overwritten by the subsequent syscall in setSpecialBaudRate.
It just was a value that was unexpected, which caught my eye. No particular reason.