mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Returned back to config
This commit is contained in:
parent
ca0f25b265
commit
4bda34b66b
3 changed files with 10 additions and 4 deletions
|
@ -52,10 +52,12 @@ typedef enum {
|
|||
GPS_ONLY
|
||||
} altSource_e;
|
||||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(positionConfig_t, positionConfig, PG_POSITION, 1);
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(positionConfig_t, positionConfig, PG_POSITION, 2);
|
||||
|
||||
PG_RESET_TEMPLATE(positionConfig_t, positionConfig,
|
||||
.altSource = DEFAULT,
|
||||
.altNumSatsGpsUse = 10,
|
||||
.altNumSatsBaroFallback = 7,
|
||||
);
|
||||
|
||||
static int32_t estimatedAltitudeCm = 0; // in cm
|
||||
|
@ -153,8 +155,8 @@ void calculateEstimatedAltitude(timeUs_t currentTimeUs)
|
|||
int badGpsSats = 0;
|
||||
|
||||
if (haveBaroAlt) {
|
||||
goodGpsSats = 10;
|
||||
badGpsSats = 7;
|
||||
goodGpsSats = positionConfig()->altNumSatsGpsUse;
|
||||
badGpsSats = positionConfig()->altNumSatsBaroFallback;
|
||||
}
|
||||
|
||||
if (ARMING_FLAG(ARMED)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue