1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-14 03:49:58 +03:00

Allow to configure speed source for DJI OSD

This commit is contained in:
Pawel Spychalski (DzikuVx) 2021-02-16 11:54:39 +01:00
parent 15321e9cea
commit 84083689bb
7 changed files with 54 additions and 18 deletions

View file

@ -44,6 +44,7 @@
#include "flight/imu.h"
#include "flight/pid.h"
#include "drivers/io_port_expander.h"
#include "io/osd_common.h"
#include "navigation/navigation.h"
#include "navigation/navigation_private.h"
@ -402,7 +403,7 @@ static int logicConditionGetFlightOperandValue(int operand) {
//FIXME align with osdGet3DSpeed
case LOGIC_CONDITION_OPERAND_FLIGHT_3D_SPEED: // cm/s
return (int) sqrtf(sq(gpsSol.groundSpeed) + sq((int)getEstimatedActualVelocity(Z)));
return osdGet3DSpeed();
break;
case LOGIC_CONDITION_OPERAND_FLIGHT_AIR_SPEED: // cm/s