Telemetry forward through Bluetooth
This commit is contained in:
@@ -33,16 +33,11 @@ void processFrskyTelemetryData(uint8_t data)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY && bluetoothState == BLUETOOTH_STATE_CONNECTED) {
|
||||
bluetoothForwardTelemetry(data);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pushFrskyTelemetryData(data)) {
|
||||
if (IS_FRSKY_SPORT_PROTOCOL()) {
|
||||
sportProcessTelemetryPacket(telemetryRxBuffer);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
frskyDProcessPacket(telemetryRxBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,6 +157,14 @@ void sportProcessTelemetryPacketWithoutCrc(uint8_t origin, const uint8_t * packe
|
||||
uint16_t dataId = *((uint16_t *)(packet+2));
|
||||
uint32_t data = SPORT_DATA_S32(packet);
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY && bluetoothState == BLUETOOTH_STATE_CONNECTED) {
|
||||
for (uint8_t i = 0; i < sizeof(SportTelemetryPacket); i++) {
|
||||
bluetoothForwardTelemetry(packet[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (primId == DATA_FRAME) {
|
||||
uint8_t instance = physicalId + (origin << 5);
|
||||
if (dataId == RSSI_ID) {
|
||||
|
||||
Reference in New Issue
Block a user