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

Merge pull request #6610 from iNavFlight/dzikuvx-dji-configurable-speed-source

Allow to configure speed source for DJI OSD
This commit is contained in:
Paweł Spychalski 2021-02-26 19:44:30 +01:00 committed by GitHub
commit f77c8e55ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 55 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"
@ -408,7 +409,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