mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Merge pull request #7871 from betaflight/revert-7603-smartaudio-lite-softserial
Revert "SmartAudio Lite compatibility: Send 0x00 bit(s) (always) even with Soft Serial."
This commit is contained in:
commit
ea454243bb
1 changed files with 8 additions and 2 deletions
|
@ -450,7 +450,14 @@ static void saReceiveFrame(uint8_t c)
|
|||
static void saSendFrame(uint8_t *buf, int len)
|
||||
{
|
||||
if (!IS_RC_MODE_ACTIVE(BOXVTXCONTROLDISABLE)) {
|
||||
serialWrite(smartAudioSerialPort, 0x00); // Ensure line is low regardless of hardware pull-down capabilities.
|
||||
switch (smartAudioSerialPort->identifier) {
|
||||
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++) {
|
||||
serialWrite(smartAudioSerialPort, buf[i]);
|
||||
|
@ -461,7 +468,6 @@ static void saSendFrame(uint8_t *buf, int len)
|
|||
sa_outstanding = SA_CMD_NONE;
|
||||
}
|
||||
|
||||
serialWrite(smartAudioSerialPort, 0x00); // Pull the line low again after sending frame.
|
||||
sa_lastTransmissionMs = millis();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue