1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Cleaned up 'getEstimatedVario()'.

This commit is contained in:
mikeller 2020-05-31 14:14:58 +12:00
parent 6bada9c5e9
commit 1812eee8fd
2 changed files with 4 additions and 5 deletions

View file

@ -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

View file

@ -705,10 +705,12 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear
smartPortSendPackage(id, getMAhDrawn()); // given in mAh, unknown requested unit
*clearToSend = false;
break;
#if defined(USE_VARIO)
case FSSP_DATAID_VARIO :
smartPortSendPackage(id, getEstimatedVario()); // unknown given unit but requested in 100 = 1m/s
*clearToSend = false;
break;
#endif
case FSSP_DATAID_HEADING :
smartPortSendPackage(id, attitude.values.yaw * 10); // given in 10*deg, requested in 10000 = 100 deg
*clearToSend = false;