mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Add new stateds
This commit is contained in:
parent
d5d47b3515
commit
339b1047e0
18 changed files with 80 additions and 78 deletions
|
@ -187,17 +187,17 @@ void initActiveBoxIds(void)
|
|||
activeBoxIds[activeBoxIdCount++] = BOXCAMSTAB;
|
||||
|
||||
#ifdef USE_GPS
|
||||
if (sensors(SENSOR_BARO) || (STATE(AIRPLANE_ROVER_BOAT) && feature(FEATURE_GPS))) {
|
||||
if (sensors(SENSOR_BARO) || (STATE(FIXED_WING) && feature(FEATURE_GPS))) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXNAVALTHOLD;
|
||||
activeBoxIds[activeBoxIdCount++] = BOXSURFACE;
|
||||
}
|
||||
|
||||
const bool navReadyQuads = !STATE(AIRPLANE_ROVER_BOAT) && (getHwCompassStatus() != HW_SENSOR_NONE) && sensors(SENSOR_ACC) && feature(FEATURE_GPS);
|
||||
const bool navReadyPlanes = STATE(AIRPLANE_ROVER_BOAT) && sensors(SENSOR_ACC) && feature(FEATURE_GPS);
|
||||
const bool navReadyQuads = !STATE(FIXED_WING) && (getHwCompassStatus() != HW_SENSOR_NONE) && sensors(SENSOR_ACC) && feature(FEATURE_GPS);
|
||||
const bool navReadyPlanes = STATE(FIXED_WING) && sensors(SENSOR_ACC) && feature(FEATURE_GPS);
|
||||
const bool navFlowDeadReckoning = sensors(SENSOR_OPFLOW) && sensors(SENSOR_ACC) && positionEstimationConfig()->allow_dead_reckoning;
|
||||
if (navFlowDeadReckoning || navReadyQuads || navReadyPlanes) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXNAVPOSHOLD;
|
||||
if (STATE(AIRPLANE_ROVER_BOAT)) {
|
||||
if (STATE(FIXED_WING)) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXLOITERDIRCHN;
|
||||
}
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ void initActiveBoxIds(void)
|
|||
|
||||
if (feature(FEATURE_GPS)) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXGCSNAV;
|
||||
if (STATE(AIRPLANE_ROVER_BOAT)) {
|
||||
if (STATE(FIXED_WING)) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXNAVCRUISE;
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ void initActiveBoxIds(void)
|
|||
|
||||
#endif
|
||||
|
||||
if (STATE(AIRPLANE_ROVER_BOAT)) {
|
||||
if (STATE(FIXED_WING)) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXMANUAL;
|
||||
if (!feature(FEATURE_FW_LAUNCH)) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXNAVLAUNCH;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue