SmartAudio Lite compatibility: Send 0x00 bit even with Soft Serial.
This commit is contained in:
parent
966971c750
commit
ca2c9ecf84
|
@ -450,14 +450,7 @@ static void saReceiveFrame(uint8_t c)
|
||||||
static void saSendFrame(uint8_t *buf, int len)
|
static void saSendFrame(uint8_t *buf, int len)
|
||||||
{
|
{
|
||||||
if (!IS_RC_MODE_ACTIVE(BOXVTXCONTROLDISABLE)) {
|
if (!IS_RC_MODE_ACTIVE(BOXVTXCONTROLDISABLE)) {
|
||||||
switch (smartAudioSerialPort->identifier) {
|
serialWrite(smartAudioSerialPort, 0x00); // Ensure line is low regardless of hardware pull-down capabilities.
|
||||||
case SERIAL_PORT_SOFTSERIAL1:
|
|
||||||
case SERIAL_PORT_SOFTSERIAL2:
|
|
||||||
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]);
|
||||||
|
@ -468,6 +461,7 @@ static void saSendFrame(uint8_t *buf, int len)
|
||||||
sa_outstanding = SA_CMD_NONE;
|
sa_outstanding = SA_CMD_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serialWrite(smartAudioSerialPort, 0x00); // Pull the line low again after sending frame.
|
||||||
sa_lastTransmissionMs = millis();
|
sa_lastTransmissionMs = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue