mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Merge pull request #9867 from mikeller/cleanup_vario
Cleaned up 'getEstimatedVario()'.
This commit is contained in:
commit
5fea4a89c7
2 changed files with 4 additions and 5 deletions
|
@ -188,12 +188,9 @@ int32_t getEstimatedAltitudeCm(void)
|
||||||
return estimatedAltitudeCm;
|
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)
|
int16_t getEstimatedVario(void)
|
||||||
{
|
{
|
||||||
#ifdef USE_VARIO
|
|
||||||
return estimatedVario;
|
return estimatedVario;
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -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
|
smartPortSendPackage(id, getMAhDrawn()); // given in mAh, should be in percent according to SmartPort spec
|
||||||
*clearToSend = false;
|
*clearToSend = false;
|
||||||
break;
|
break;
|
||||||
|
#if defined(USE_VARIO)
|
||||||
case FSSP_DATAID_VARIO :
|
case FSSP_DATAID_VARIO :
|
||||||
smartPortSendPackage(id, getEstimatedVario()); // in cm/s according to SmartPort spec
|
smartPortSendPackage(id, getEstimatedVario()); // in cm/s according to SmartPort spec
|
||||||
*clearToSend = false;
|
*clearToSend = false;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case FSSP_DATAID_HEADING :
|
case FSSP_DATAID_HEADING :
|
||||||
smartPortSendPackage(id, attitude.values.yaw * 10); // in degrees * 100 according to SmartPort spec
|
smartPortSendPackage(id, attitude.values.yaw * 10); // in degrees * 100 according to SmartPort spec
|
||||||
*clearToSend = false;
|
*clearToSend = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue