Skip to content

Commit aec8e79

Browse files
committed
LP-608 Allow min/max altitude recording for standalone board without inputs
1 parent 14a7e7a commit aec8e79

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flight/modules/UAVOHottBridge/uavohottbridge.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,9 @@ void update_telemetrydata()
658658
// calculate altitude relative to start position
659659
telestate->altitude = -telestate->Position.Down;
660660

661-
// check and set min/max values when armed.
662-
if (telestate->FlightStatus.Armed == FLIGHTSTATUS_ARMED_ARMED) {
661+
// check and set min/max values when armed
662+
// and without receiver input for standalone board used as sensor
663+
if ((telestate->FlightStatus.Armed == FLIGHTSTATUS_ARMED_ARMED) || ((telestate->SysAlarms.Alarm.Attitude == SYSTEMALARMS_ALARM_OK) && (telestate->SysAlarms.Alarm.Receiver != SYSTEMALARMS_ALARM_OK))) {
663664
if (telestate->min_altitude > telestate->altitude) {
664665
telestate->min_altitude = telestate->altitude;
665666
}

0 commit comments

Comments
 (0)