AP_Frsky_Telem: avoid use if int16-t read call
Tested in SITL with gdb
The number of characters is checked above, is it actually possible for the read to fail here? If so that’s certainly a gotcha that needs to be documented.
The number of characters is checked above, is it actually possible for the read to fail here? If so that’s certainly a gotcha that needs to be documented.
Technically yes, but you really have to work at it and/or do silly things. e.g. read from the same port in a higher-priority thread (you might be able to arrange it using mavlink-passthrough, for example). There's no technical mutex against multiple consumers on a serial port, 'though we do have protections floating around for various scenarios (e.g. that pass-through support)
Still, as I've done in https://github.com/ArduPilot/ardupilot/pull/27397/files , you can close that hole and avoid problems revolving around that int16_t return value at the same time...
Multiple consumers on a port is definitely a little scary... What do you mean by mavlink passthrough?