[9XR-PRO] Telemetry fix

This commit is contained in:
bsongis
2014-08-27 15:30:12 +02:00
parent bb7b37de62
commit 03039a1c5a
5 changed files with 31 additions and 52 deletions
+3 -3
View File
@@ -277,7 +277,7 @@ enum AlarmsCheckSteps {
void telemetryWakeup()
{
#if defined(CPUARM)
uint8_t requiredTelemetryProtocol = MODEL_TELEMETRY_PROTOCOL;
uint8_t requiredTelemetryProtocol = MODEL_TELEMETRY_PROTOCOL();
if (telemetryProtocol != requiredTelemetryProtocol) {
telemetryProtocol = requiredTelemetryProtocol;
telemetryInit();
@@ -307,8 +307,8 @@ void telemetryWakeup()
}
#elif defined(PCBSKY9X)
if (telemetryProtocol == PROTOCOL_FRSKY_D_SECONDARY) {
uint16_t data ;
while ((data=telemetrySecondPortReceive()) != 0xFFFF) {
uint8_t data;
while (telemetrySecondPortReceive(data)) {
processSerialData(data);
}
}
+2 -2
View File
@@ -477,9 +477,9 @@ void frskyUpdateCells(void);
#endif
#if defined(PCBTARANIS)
#define MODEL_TELEMETRY_PROTOCOL ((g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.externalModule == MODULE_TYPE_PPM) ? g_model.telemetryProtocol : PROTOCOL_FRSKY_SPORT)
#define MODEL_TELEMETRY_PROTOCOL() ((g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.externalModule == MODULE_TYPE_PPM) ? g_model.telemetryProtocol : PROTOCOL_FRSKY_SPORT)
#elif defined(CPUARM)
#define MODEL_TELEMETRY_PROTOCOL g_model.telemetryProtocol
#define MODEL_TELEMETRY_PROTOCOL() g_model.telemetryProtocol
#endif
#endif