mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Merge branch 'corvuscorax/OP-1371_fix-hitl-sanitychecks' into next
This commit is contained in:
commit
b186833290
@ -38,6 +38,7 @@
|
||||
#include <systemsettings.h>
|
||||
#include <systemalarms.h>
|
||||
#include <revosettings.h>
|
||||
#include <positionstate.h>
|
||||
#include <taskinfo.h>
|
||||
|
||||
// a number of useful macros
|
||||
@ -79,10 +80,17 @@ int32_t configuration_check()
|
||||
break;
|
||||
default:
|
||||
navCapableFusion = false;
|
||||
// check for hitl. hitl allows to feed position and velocity state via
|
||||
// telemetry, this makes nav possible even with an unsuited algorithm
|
||||
if (PositionStateHandle()) {
|
||||
if (PositionStateReadOnly()) {
|
||||
navCapableFusion = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
const bool navCapableFusion = false;
|
||||
#endif
|
||||
#endif /* ifdef REVOLUTION */
|
||||
|
||||
|
||||
// Classify airframe type
|
||||
@ -173,7 +181,12 @@ int32_t configuration_check()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Check on a multirotor no axis supports "None"
|
||||
uint8_t checks_disabled;
|
||||
FlightModeSettingsDisableSanityChecksGet(&checks_disabled);
|
||||
if (checks_disabled == FLIGHTMODESETTINGS_DISABLESANITYCHECKS_TRUE) {
|
||||
severity = SYSTEMALARMS_ALARM_WARNING;
|
||||
}
|
||||
|
||||
if (severity != SYSTEMALARMS_ALARM_OK) {
|
||||
ExtendedAlarmsSet(SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION, severity, alarmstatus, alarmsubstatus);
|
||||
} else {
|
||||
|
@ -200,6 +200,8 @@ static void receiverTask(__attribute__((unused)) void *parameters)
|
||||
UAVObjSetAccess(&metadata, ACCESS_READWRITE);
|
||||
ManualControlCommandSetMetadata(&metadata);
|
||||
}
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_RECEIVER, SYSTEMALARMS_ALARM_WARNING);
|
||||
continue;
|
||||
}
|
||||
|
||||
bool valid_input_detected = true;
|
||||
|
@ -108,6 +108,7 @@
|
||||
<field name="ArmedTimeout" units="ms" type="uint16" elements="1" defaultvalue="30000"/>
|
||||
<field name="ArmingSequenceTime" units="ms" type="uint16" elements="1" defaultvalue="1000"/>
|
||||
<field name="DisarmingSequenceTime" units="ms" type="uint16" elements="1" defaultvalue="1000"/>
|
||||
<field name="DisableSanityChecks" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE"/>
|
||||
<field name="ReturnToBaseAltitudeOffset" units="m" type="float" elements="1" defaultvalue="10"/>
|
||||
<field name="PositionHoldOffset" units="m" type="float" elementnames="Horizontal,Vertical" defaultvalue="10,2"/>
|
||||
<!-- optimized for current vtolpathfollower,
|
||||
|
Loading…
x
Reference in New Issue
Block a user