Skip to content

Commit

Permalink
AP_Frsky_Telem: avoid use if int16-t read call
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Jul 2, 2024
1 parent 85f8981 commit f3a7566
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/AP_Frsky_Telem/AP_Frsky_SPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ void AP_Frsky_SPort::send(void)
}

for (int16_t i = 0; i < numc; i++) {
int16_t readbyte = _port->read();
uint8_t readbyte;
if (!_port->read(readbyte)) {
break;
}
if (_SPort.sport_status == false) {
if (readbyte == FRAME_HEAD) {
_SPort.sport_status = true;
Expand Down

0 comments on commit f3a7566

Please sign in to comment.