g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
378 stars 274 forks source link

#fc836f3 breaks MacOS uart 460800 support #718

Open shawnchain opened 3 years ago

shawnchain commented 3 years ago

https://github.com/g4klx/MMDVMHost/blob/b57b781ab8a4fad4fe47d1e530dfa609bf87436b/UARTController.cpp#L353

this change may break the high baudrate support under macos.

B460800 is not defined in macos' posix header file, but macos does support that speed. Pass the the number 460800 to cfsetospeed() / cfsetispeed() instead.

jg1uaa commented 3 years ago

@shawnchain please wait. this define is not required. at least I wrote this https://github.com/g4klx/MMDVMHost/blob/b57b781ab8a4fad4fe47d1e530dfa609bf87436b/UARTController.cpp#L297 and OSX (and BSD) uses https://github.com/g4klx/MMDVMHost/blob/b57b781ab8a4fad4fe47d1e530dfa609bf87436b/UARTController.cpp#L364 leaf. I read https://github.com/st3fan/osx-10.9/blob/master/xnu-2422.1.72/bsd/sys/termios.h and I know OSX (and BSD) need to pass raw value to cfsetospeed() / cfsetispeed().

jg1uaa commented 3 years ago

@shawnchain ping

shawnchain commented 3 years ago

@shawnchain ping

sorry for the late reply! yes, you're correct.