mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
add gps rescue mode
This commit is contained in:
parent
43c706fc95
commit
ac6b8088c9
24 changed files with 653 additions and 32 deletions
|
@ -282,7 +282,7 @@ static const char * const lookupTableDtermLowpassType[] = {
|
|||
|
||||
|
||||
static const char * const lookupTableFailsafe[] = {
|
||||
"AUTO-LAND", "DROP"
|
||||
"AUTO-LAND", "DROP", "GPS-RESCUE"
|
||||
};
|
||||
|
||||
static const char * const lookupTableBusType[] = {
|
||||
|
@ -328,6 +328,13 @@ static const char * const lookupTableThrottleLimitType[] = {
|
|||
"OFF", "SCALE", "CLIP"
|
||||
};
|
||||
|
||||
|
||||
#ifdef USE_GPS_RESCUE
|
||||
static const char * const lookupTableRescueSanityType[] = {
|
||||
"RESCUE_SANITY_OFF", "RESCUE_SANITY_ON", "RESCUE_SANITY_FS_ONLY"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef USE_MAX7456
|
||||
static const char * const lookupTableVideoSystem[] = {
|
||||
"AUTO", "PAL", "NTSC"
|
||||
|
@ -343,6 +350,9 @@ const lookupTableEntry_t lookupTables[] = {
|
|||
#ifdef USE_GPS
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGPSProvider),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGPSSBASMode),
|
||||
#ifdef USE_GPS_RESCUE
|
||||
LOOKUP_TABLE_ENTRY(lookupTableRescueSanityType),
|
||||
#endif
|
||||
#endif
|
||||
#ifdef USE_BLACKBOX
|
||||
LOOKUP_TABLE_ENTRY(lookupTableBlackboxDevice),
|
||||
|
@ -681,8 +691,29 @@ const clivalue_t valueTable[] = {
|
|||
{ "gps_sbas_mode", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_SBAS_MODE }, PG_GPS_CONFIG, offsetof(gpsConfig_t, sbasMode) },
|
||||
{ "gps_auto_config", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, autoConfig) },
|
||||
{ "gps_auto_baud", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, autoBaud) },
|
||||
|
||||
#ifdef USE_GPS_RESCUE
|
||||
// PG_GPS_RESCUE
|
||||
{ "gps_rescue_angle", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 200 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, angle) },
|
||||
{ "gps_rescue_initial_alt", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 20, 100 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, initialAltitude) },
|
||||
{ "gps_rescue_descent_dist", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 30, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, descentDistance) },
|
||||
{ "gps_rescue_ground_speed", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 30, 3000 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, rescueGroundspeed) },
|
||||
{ "gps_rescue_throttle_P", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, throttleP) },
|
||||
{ "gps_rescue_throttle_I", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, throttleI) },
|
||||
{ "gps_rescue_throttle_D", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, throttleD) },
|
||||
{ "gps_rescue_velocity_P", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, velP) },
|
||||
{ "gps_rescue_velocity_I", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, velI) },
|
||||
{ "gps_rescue_velocity_D", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, velD) },
|
||||
{ "gps_rescue_yaw_P", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 500 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, yawP) },
|
||||
|
||||
{ "gps_rescue_throttle_min", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1000, 2000 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, throttleMin) },
|
||||
{ "gps_rescue_throttle_max", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1000, 2000 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, throttleMax) },
|
||||
{ "gps_rescue_throttle_hover", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1000, 2000 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, throttleHover) },
|
||||
{ "gps_rescue_sanity_checks", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_RESCUE }, PG_GPS_RESCUE, offsetof(gpsRescue_t, sanityChecks) },
|
||||
{ "gps_rescue_min_sats", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 50 }, PG_GPS_RESCUE, offsetof(gpsRescue_t, minSats) },
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
{ "deadband", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 32 }, PG_RC_CONTROLS_CONFIG, offsetof(rcControlsConfig_t, deadband) },
|
||||
{ "yaw_deadband", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 100 }, PG_RC_CONTROLS_CONFIG, offsetof(rcControlsConfig_t, yaw_deadband) },
|
||||
{ "yaw_control_reversed", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_RC_CONTROLS_CONFIG, offsetof(rcControlsConfig_t, yaw_control_reversed) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue