From a42b63ff349448d39c5b1a2bb18dcff94653ed44 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Fri, 22 Jan 2016 22:14:51 +0100 Subject: [PATCH] [Horus] Missing telemetry code --- radio/src/telemetry/frsky.cpp | 4 ++-- radio/src/telemetry/frsky_sport.cpp | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/radio/src/telemetry/frsky.cpp b/radio/src/telemetry/frsky.cpp index d9bf41d91..827bf6340 100644 --- a/radio/src/telemetry/frsky.cpp +++ b/radio/src/telemetry/frsky.cpp @@ -282,7 +282,7 @@ void telemetryWakeup() } #endif -#if defined(PCBTARANIS) +#if defined(CPUSTM32) uint8_t data; #if defined(SPORT_FILE_LOG) && !defined(SIMU) static tmr10ms_t lastTime = 0; @@ -609,7 +609,7 @@ void telemetryInit(uint8_t protocol) if (protocol == PROTOCOL_FRSKY_D) { telemetryPortInit(FRSKY_D_BAUDRATE); } -#if defined(PCBTARANIS) +#if defined(CROSSFIRE) else if (protocol == PROTOCOL_PULSES_CROSSFIRE) { telemetryPortInit(CROSSFIRE_BAUDRATE); telemetryPortSetDirectionOutput(); diff --git a/radio/src/telemetry/frsky_sport.cpp b/radio/src/telemetry/frsky_sport.cpp index 8c7904f53..0e1345d60 100644 --- a/radio/src/telemetry/frsky_sport.cpp +++ b/radio/src/telemetry/frsky_sport.cpp @@ -199,7 +199,7 @@ void processSportPacket(uint8_t * packet) uint8_t prim = packet[1]; uint16_t id = *((uint16_t *)(packet+2)); -#if defined(PCBTARANIS) && !defined(SIMU) +#if defined(CPUSTM32) && !defined(SIMU) if (sportUpdateState != SPORT_IDLE) { processSportUpdatePacket(packet); // Uses different chksum return; @@ -320,7 +320,7 @@ void frskySportSetDefault(int index, uint16_t id, uint8_t subId, uint8_t instanc storageDirty(EE_MODEL); } -#if defined(PCBTARANIS) +#if defined(CPUSTM32) bool sportWaitState(SportUpdateState state, int timeout) { #if defined(SIMU) @@ -375,7 +375,7 @@ bool sportUpdatePowerOn(ModuleIndex module) sportUpdateState = SPORT_POWERUP_REQ; -#if defined(PCBTARANIS) +#if defined(PCBTARANIS) || defined(PCBHORUS) intPwr = IS_INTERNAL_MODULE_ON(); extPwr = IS_EXTERNAL_MODULE_ON(); INTERNAL_MODULE_OFF(); @@ -386,7 +386,7 @@ bool sportUpdatePowerOn(ModuleIndex module) telemetryPortInit(FRSKY_SPORT_BAUDRATE); -#if defined(PCBTARANIS) +#if defined(PCBTARANIS) || defined(PCBHORUS) if (module == INTERNAL_MODULE) INTERNAL_MODULE_ON(); else @@ -501,13 +501,15 @@ void sportFirmwareUpdate(ModuleIndex module, const char *filename) POPUP_WARNING("Firmware Update Error"); } -#if defined(PCBTARANIS) +#if defined(PCBTARANIS) || defined(PCBHORUS) INTERNAL_MODULE_OFF(); EXTERNAL_MODULE_OFF(); +#endif sportWaitState(SPORT_IDLE, 1000); - if (intPwr) +#if defined(PCBTARANIS) || defined(PCBHORUS) + if (intPwr) INTERNAL_MODULE_ON(); if (extPwr) EXTERNAL_MODULE_ON();