1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Removed softserial loopback.

This commit is contained in:
Michael Keller 2021-09-07 10:23:10 +12:00
parent 1a97cbc9db
commit 54588cf7dd
3 changed files with 0 additions and 28 deletions

View file

@ -176,25 +176,8 @@
void targetPreInit(void);
#endif
#ifdef SOFTSERIAL_LOOPBACK
serialPort_t *loopbackPort;
#endif
uint8_t systemState = SYSTEM_STATE_INITIALISING;
void processLoopback(void)
{
#ifdef SOFTSERIAL_LOOPBACK
if (loopbackPort) {
uint8_t bytesWaiting;
while ((bytesWaiting = serialRxBytesWaiting(loopbackPort))) {
uint8_t b = serialRead(loopbackPort);
serialWrite(loopbackPort, b);
};
}
#endif
}
#ifdef BUS_SWITCH_PIN
void busSwitchInit(void)
{
@ -874,15 +857,6 @@ void init(void)
timerStart();
#endif
#ifdef SOFTSERIAL_LOOPBACK
// FIXME this is a hack, perhaps add a FUNCTION_LOOPBACK to support it properly
loopbackPort = (serialPort_t*)&(softSerialPorts[0]);
if (!loopbackPort->vTable) {
loopbackPort = openSoftSerial(0, NULL, 19200, SERIAL_NOT_INVERTED);
}
serialPrint(loopbackPort, "LOOPBACK\r\n");
#endif
batteryInit(); // always needs doing, regardless of features.
#ifdef USE_RCDEVICE