diff --git a/src/main/flight/position.c b/src/main/flight/position.c index daa3e1e124..fc60621351 100644 --- a/src/main/flight/position.c +++ b/src/main/flight/position.c @@ -188,12 +188,9 @@ int32_t getEstimatedAltitudeCm(void) return estimatedAltitudeCm; } -// This should be removed or fixed, but it would require changing a lot of other things to get rid of. +#ifdef USE_VARIO int16_t getEstimatedVario(void) { -#ifdef USE_VARIO return estimatedVario; -#else - return 0; -#endif } +#endif diff --git a/src/main/telemetry/smartport.c b/src/main/telemetry/smartport.c index 7485268b9c..7a516f6e2e 100644 --- a/src/main/telemetry/smartport.c +++ b/src/main/telemetry/smartport.c @@ -705,10 +705,12 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear smartPortSendPackage(id, getMAhDrawn()); // given in mAh, should be in percent according to SmartPort spec *clearToSend = false; break; +#if defined(USE_VARIO) case FSSP_DATAID_VARIO : smartPortSendPackage(id, getEstimatedVario()); // in cm/s according to SmartPort spec *clearToSend = false; break; +#endif case FSSP_DATAID_HEADING : smartPortSendPackage(id, attitude.values.yaw * 10); // in degrees * 100 according to SmartPort spec *clearToSend = false;