1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 01:35:35 +03:00

fix problem with smartaudio on softserial

This commit is contained in:
jmajew 2021-09-21 23:59:03 +02:00
parent b51cb7739a
commit 2e74dc3575

View file

@ -492,14 +492,9 @@ static void saReceiveFramer(uint8_t c)
static void saSendFrame(uint8_t *buf, int len) static void saSendFrame(uint8_t *buf, int len)
{ {
switch (smartAudioSerialPort->identifier) { // TBS SA definition requires that the line is low before frame is sent
case SERIAL_PORT_SOFTSERIAL1: // (for both soft and hard serial). It can be done by sending first 0x00
case SERIAL_PORT_SOFTSERIAL2: serialWrite(smartAudioSerialPort, 0x00);
break;
default:
serialWrite(smartAudioSerialPort, 0x00); // Generate 1st start bit
break;
}
for (int i = 0 ; i < len ; i++) { for (int i = 0 ; i < len ; i++) {
serialWrite(smartAudioSerialPort, buf[i]); serialWrite(smartAudioSerialPort, buf[i]);