[Horus] Missing telemetry code

This commit is contained in:
Bertrand Songis
2016-01-22 22:14:51 +01:00
parent d2ec99513c
commit a42b63ff34
2 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -282,7 +282,7 @@ void telemetryWakeup()
} }
#endif #endif
#if defined(PCBTARANIS) #if defined(CPUSTM32)
uint8_t data; uint8_t data;
#if defined(SPORT_FILE_LOG) && !defined(SIMU) #if defined(SPORT_FILE_LOG) && !defined(SIMU)
static tmr10ms_t lastTime = 0; static tmr10ms_t lastTime = 0;
@@ -609,7 +609,7 @@ void telemetryInit(uint8_t protocol)
if (protocol == PROTOCOL_FRSKY_D) { if (protocol == PROTOCOL_FRSKY_D) {
telemetryPortInit(FRSKY_D_BAUDRATE); telemetryPortInit(FRSKY_D_BAUDRATE);
} }
#if defined(PCBTARANIS) #if defined(CROSSFIRE)
else if (protocol == PROTOCOL_PULSES_CROSSFIRE) { else if (protocol == PROTOCOL_PULSES_CROSSFIRE) {
telemetryPortInit(CROSSFIRE_BAUDRATE); telemetryPortInit(CROSSFIRE_BAUDRATE);
telemetryPortSetDirectionOutput(); telemetryPortSetDirectionOutput();
+7 -5
View File
@@ -199,7 +199,7 @@ void processSportPacket(uint8_t * packet)
uint8_t prim = packet[1]; uint8_t prim = packet[1];
uint16_t id = *((uint16_t *)(packet+2)); uint16_t id = *((uint16_t *)(packet+2));
#if defined(PCBTARANIS) && !defined(SIMU) #if defined(CPUSTM32) && !defined(SIMU)
if (sportUpdateState != SPORT_IDLE) { if (sportUpdateState != SPORT_IDLE) {
processSportUpdatePacket(packet); // Uses different chksum processSportUpdatePacket(packet); // Uses different chksum
return; return;
@@ -320,7 +320,7 @@ void frskySportSetDefault(int index, uint16_t id, uint8_t subId, uint8_t instanc
storageDirty(EE_MODEL); storageDirty(EE_MODEL);
} }
#if defined(PCBTARANIS) #if defined(CPUSTM32)
bool sportWaitState(SportUpdateState state, int timeout) bool sportWaitState(SportUpdateState state, int timeout)
{ {
#if defined(SIMU) #if defined(SIMU)
@@ -375,7 +375,7 @@ bool sportUpdatePowerOn(ModuleIndex module)
sportUpdateState = SPORT_POWERUP_REQ; sportUpdateState = SPORT_POWERUP_REQ;
#if defined(PCBTARANIS) #if defined(PCBTARANIS) || defined(PCBHORUS)
intPwr = IS_INTERNAL_MODULE_ON(); intPwr = IS_INTERNAL_MODULE_ON();
extPwr = IS_EXTERNAL_MODULE_ON(); extPwr = IS_EXTERNAL_MODULE_ON();
INTERNAL_MODULE_OFF(); INTERNAL_MODULE_OFF();
@@ -386,7 +386,7 @@ bool sportUpdatePowerOn(ModuleIndex module)
telemetryPortInit(FRSKY_SPORT_BAUDRATE); telemetryPortInit(FRSKY_SPORT_BAUDRATE);
#if defined(PCBTARANIS) #if defined(PCBTARANIS) || defined(PCBHORUS)
if (module == INTERNAL_MODULE) if (module == INTERNAL_MODULE)
INTERNAL_MODULE_ON(); INTERNAL_MODULE_ON();
else else
@@ -501,12 +501,14 @@ void sportFirmwareUpdate(ModuleIndex module, const char *filename)
POPUP_WARNING("Firmware Update Error"); POPUP_WARNING("Firmware Update Error");
} }
#if defined(PCBTARANIS) #if defined(PCBTARANIS) || defined(PCBHORUS)
INTERNAL_MODULE_OFF(); INTERNAL_MODULE_OFF();
EXTERNAL_MODULE_OFF(); EXTERNAL_MODULE_OFF();
#endif
sportWaitState(SPORT_IDLE, 1000); sportWaitState(SPORT_IDLE, 1000);
#if defined(PCBTARANIS) || defined(PCBHORUS)
if (intPwr) if (intPwr)
INTERNAL_MODULE_ON(); INTERNAL_MODULE_ON();
if (extPwr) if (extPwr)