Skip to content

Commit

Permalink
Make lookupTableThrottleLimitType an extern variable (betaflight#13204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Efimov authored Dec 8, 2023
1 parent 380d39e commit d3830b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/main/cli/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,10 @@ static const char * const lookupOverclock[] = {
};
#endif

static const char * const lookupTableThrottleLimitType[] = {
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"
Expand Down
2 changes: 2 additions & 0 deletions src/main/cli/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,5 @@ extern const char * const lookupTableOffOn[];
extern const char * const lookupTableSimplifiedTuningPidsMode[];

extern const char * const lookupTableCMSMenuBackgroundType[];

extern const char * const lookupTableThrottleLimitType[];
6 changes: 1 addition & 5 deletions src/main/cms/cms_menu_imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ static uint8_t rateProfileIndex;
static char rateProfileIndexString[MAX_RATE_PROFILE_NAME_LENGTH + PROFILE_INDEX_STRING_ADDITIONAL_SIZE];
static controlRateConfig_t rateProfile;

static const char * const osdTableThrottleLimitType[] = {
"OFF", "SCALE", "CLIP"
};

#ifdef USE_MULTI_GYRO
static const char * const osdTableGyroToUse[] = {
"FIRST", "SECOND", "BOTH"
Expand Down Expand Up @@ -435,7 +431,7 @@ static const OSD_Entry cmsx_menuRateProfileEntries[] =
{ "THR MID", OME_UINT8, NULL, &(OSD_UINT8_t) { &rateProfile.thrMid8, 0, 100, 1} },
{ "THR EXPO", OME_UINT8, NULL, &(OSD_UINT8_t) { &rateProfile.thrExpo8, 0, 100, 1} },

{ "THR LIM TYPE",OME_TAB, NULL, &(OSD_TAB_t) { &rateProfile.throttle_limit_type, THROTTLE_LIMIT_TYPE_COUNT - 1, osdTableThrottleLimitType} },
{ "THR LIM TYPE",OME_TAB, NULL, &(OSD_TAB_t) { &rateProfile.throttle_limit_type, THROTTLE_LIMIT_TYPE_COUNT - 1, lookupTableThrottleLimitType} },
{ "THR LIM %", OME_UINT8, NULL, &(OSD_UINT8_t) { &rateProfile.throttle_limit_percent, 25, 100, 1} },

{ "BACK", OME_Back, NULL, NULL },
Expand Down
7 changes: 2 additions & 5 deletions src/main/cms/cms_menu_quick.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

#include "sensors/battery.h"

#include "cli/settings.h"

#include "cms_menu_quick.h"

static controlRateConfig_t rateProfile;
Expand Down Expand Up @@ -85,11 +87,6 @@ static const void *cmsx_RateProfileWriteback(displayPort_t *pDisp, const OSD_Ent
return NULL;
}


static const char * const osdTableThrottleLimitType[] = {
"OFF", "SCALE", "CLIP"
};

static const OSD_Entry menuMainEntries[] =
{
{ "-- QUICK --", OME_Label, NULL, NULL },
Expand Down

0 comments on commit d3830b6

Please sign in to comment.