Fix compiler errors when telemetry is disabled (#474)

This commit is contained in:
Ben Lye 2020-11-30 07:38:21 +00:00 committed by GitHub
parent e53f723fdb
commit b4421306c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View File

@ -142,8 +142,9 @@ static void __attribute__((unused)) OMP_initialize_txid()
#endif #endif
} }
static void __attribute__((unused)) OMP_Send_Telemetry(uint8_t v) #ifdef OMP_HUB_TELEMETRY
{ static void __attribute__((unused)) OMP_Send_Telemetry(uint8_t v)
{
v_lipo1=v; v_lipo1=v;
telemetry_counter++; //LQI telemetry_counter++; //LQI
telemetry_link=1; telemetry_link=1;
@ -153,7 +154,8 @@ static void __attribute__((unused)) OMP_Send_Telemetry(uint8_t v)
packet_count = 100; packet_count = 100;
telemetry_counter = 100; telemetry_counter = 100;
} }
} }
#endif
enum { enum {
OMP_BIND = 0x00, OMP_BIND = 0x00,

View File

@ -344,6 +344,7 @@
#undef OMP_HUB_TELEMETRY #undef OMP_HUB_TELEMETRY
#undef RLINK_HUB_TELEMETRY #undef RLINK_HUB_TELEMETRY
#undef DSM_RX_CYRF6936_INO #undef DSM_RX_CYRF6936_INO
#undef DSM_FWD_PGM
#else #else
#if defined(MULTI_TELEMETRY) && defined(MULTI_STATUS) #if defined(MULTI_TELEMETRY) && defined(MULTI_STATUS)
#error You should choose either MULTI_TELEMETRY or MULTI_STATUS but not both. #error You should choose either MULTI_TELEMETRY or MULTI_STATUS but not both.