1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

correct casing per mikeller review

This commit is contained in:
s0up 2018-07-22 12:23:33 -07:00
parent 0f2dc6328e
commit 3ade65a438
3 changed files with 4 additions and 4 deletions

View file

@ -73,7 +73,7 @@ PG_RESET_TEMPLATE(gpsRescueConfig_t, gpsRescueConfig,
.throttleHover = 1280, .throttleHover = 1280,
.sanityChecks = RESCUE_SANITY_ON, .sanityChecks = RESCUE_SANITY_ON,
.minSats = 8, .minSats = 8,
.minRescueDTH = 100 .minRescueDth = 100
); );
static uint16_t rescueThrottle; static uint16_t rescueThrottle;
@ -125,7 +125,7 @@ void updateGPSRescueState(void)
} }
// Minimum distance detection. Disarm regardless of sanity check configuration. Rescue too close is never a good idea. // Minimum distance detection. Disarm regardless of sanity check configuration. Rescue too close is never a good idea.
if (rescueState.sensor.distanceToHome < gpsRescueConfig()->minRescueDTH) { if (rescueState.sensor.distanceToHome < gpsRescueConfig()->minRescueDth) {
// Never allow rescue mode to engage as a failsafe when too close or when disarmed. // Never allow rescue mode to engage as a failsafe when too close or when disarmed.
if (rescueState.isFailsafe || !ARMING_FLAG(ARMED)) { if (rescueState.isFailsafe || !ARMING_FLAG(ARMED)) {
rescueState.failure = RESCUE_TOO_CLOSE; rescueState.failure = RESCUE_TOO_CLOSE;

View file

@ -37,7 +37,7 @@ typedef struct gpsRescue_s {
uint16_t throttleHover; uint16_t throttleHover;
uint16_t velP, velI, velD; uint16_t velP, velI, velD;
uint8_t minSats; uint8_t minSats;
uint16_t minRescueDTH; //meters uint16_t minRescueDth; //meters
gpsRescueSanity_e sanityChecks; gpsRescueSanity_e sanityChecks;
} gpsRescueConfig_t; } gpsRescueConfig_t;

View file

@ -766,7 +766,7 @@ const clivalue_t valueTable[] = {
{ "gps_rescue_throttle_hover", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1000, 2000 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, throttleHover) }, { "gps_rescue_throttle_hover", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1000, 2000 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, throttleHover) },
{ "gps_rescue_sanity_checks", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_RESCUE }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, sanityChecks) }, { "gps_rescue_sanity_checks", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_RESCUE }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, sanityChecks) },
{ "gps_rescue_min_sats", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 50 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, minSats) }, { "gps_rescue_min_sats", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 50 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, minSats) },
{ "gps_rescue_min_dth", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 50, 1000 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, minRescueDTH) }, { "gps_rescue_min_dth", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 50, 1000 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, minRescueDth) },
#endif #endif
#endif #endif