Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lookupTableThrottleLimitType an extern variable #13204

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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[] = {
haslinghuis marked this conversation as resolved.
Show resolved Hide resolved
"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