1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Altitde source calculation option (#8127)

Altitde source calculation option
This commit is contained in:
Michael Keller 2019-05-02 00:26:05 +12:00 committed by GitHub
commit adb4ca39ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 3 deletions

View file

@ -455,6 +455,10 @@ static const char * const lookupTableGyroFilterDebug[] = {
"ROLL", "PITCH", "YAW"
};
static const char * const lookupTablePositionAltSource[] = {
"DEFAULT", "BARO_ONLY", "GPS_ONLY"
};
#define LOOKUP_TABLE_ENTRY(name) { name, ARRAYLEN(name) }
const lookupTableEntry_t lookupTables[] = {
@ -566,6 +570,8 @@ const lookupTableEntry_t lookupTables[] = {
#endif
LOOKUP_TABLE_ENTRY(lookupTableGyroFilterDebug),
LOOKUP_TABLE_ENTRY(lookupTablePositionAltSource)
};
#undef LOOKUP_TABLE_ENTRY
@ -1445,6 +1451,9 @@ const clivalue_t valueTable[] = {
#ifdef USE_OSD
{ "display_name", VAR_UINT8 | MASTER_VALUE | MODE_STRING, .config.string = { 1, MAX_NAME_LENGTH, STRING_FLAGS_NONE }, PG_PILOT_CONFIG, offsetof(pilotConfig_t, displayName) },
#endif
// PG_POSITION
{ "position_alt_source", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_POSITION_ALT_SOURCE }, PG_POSITION, offsetof(positionConfig_t, altSource) },
};
const uint16_t valueTableEntryCount = ARRAYLEN(valueTable);