More unneeded definitions removed
This commit is contained in:
@@ -169,10 +169,10 @@ if(CROSSFIRE)
|
||||
endif()
|
||||
|
||||
add_definitions(-DCPUARM)
|
||||
add_definitions(-DTELEMETRY_FRSKY -DTELEMETRY_FRSKY_SPORT -DGPS)
|
||||
|
||||
add_definitions(-DGPS)
|
||||
add_definitions(-DBOLD_FONT -DBATTGRAPH -DTHRTRACE)
|
||||
add_definitions(-DREQUIRED_SDCARD_VERSION="${SDCARD_VERSION}")
|
||||
|
||||
include_directories(${COOS_DIR} ${COOS_DIR}/kernel ${COOS_DIR}/portable)
|
||||
foreach(LANGUAGE ${TTS_LANGUAGES})
|
||||
string(TOLOWER ${LANGUAGE} lang_lower)
|
||||
|
||||
@@ -316,17 +316,12 @@ void OpenTxSimulator::setTrainerTimeout(uint16_t ms)
|
||||
|
||||
void OpenTxSimulator::sendTelemetry(const QByteArray data)
|
||||
{
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
//OTXS_DBG << data;
|
||||
sportProcessTelemetryPacket((uint8_t *)data.constData());
|
||||
#else
|
||||
Q_UNUSED(data)
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t OpenTxSimulator::getSensorInstance(uint16_t id, uint8_t defaultValue)
|
||||
{
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
for (int i = 0; i < MAX_TELEMETRY_SENSORS; i++) {
|
||||
if (isTelemetryFieldAvailable(i)) {
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
|
||||
@@ -335,15 +330,11 @@ uint8_t OpenTxSimulator::getSensorInstance(uint16_t id, uint8_t defaultValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(id)
|
||||
#endif
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
uint16_t OpenTxSimulator::getSensorRatio(uint16_t id)
|
||||
{
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
for (int i = 0; i < MAX_TELEMETRY_SENSORS; i++) {
|
||||
if (isTelemetryFieldAvailable(i)) {
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
|
||||
@@ -352,9 +343,6 @@ uint16_t OpenTxSimulator::getSensorRatio(uint16_t id)
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(id)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -378,9 +366,7 @@ const int OpenTxSimulator::getCapability(Capability cap)
|
||||
break;
|
||||
|
||||
case CAP_TELEM_FRSKY_SPORT :
|
||||
#ifdef TELEMETRY_FRSKY_SPORT
|
||||
ret = 1;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -109,7 +109,6 @@ extern "C" void UART0_IRQHandler()
|
||||
#define SECOND_UART_Configure(...)
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
void auxSerialTelemetryInit(unsigned int /*protocol*/)
|
||||
{
|
||||
SECOND_UART_Configure(FRSKY_D_BAUDRATE, Master_frequency);
|
||||
@@ -119,7 +118,6 @@ bool telemetrySecondPortReceive(uint8_t & data)
|
||||
{
|
||||
return auxSerialRxFifo.pop(data);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG) && !defined(SIMU)
|
||||
void serialPrintf(const char*, ... ) {}
|
||||
|
||||
Reference in New Issue
Block a user