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:
parent
b51cb7739a
commit
2e74dc3575
1 changed files with 3 additions and 8 deletions
|
@ -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]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue