Add throttle limit settings to CMS
There have been a number of requests for this as it seems to be common for racers to tune these values and adjust the settings as they become more comfortable with a track. Previously the settings could only be adjusted in the CLI and required a computer. Adding them to the CMS makes it easy to adjust in the field.
This commit is contained in:
parent
9486789204
commit
9830681158
|
@ -66,6 +66,10 @@ static uint8_t rateProfileIndex;
|
|||
static char rateProfileIndexString[] = " p-r";
|
||||
static controlRateConfig_t rateProfile;
|
||||
|
||||
static const char * const osdTableThrottleLimitType[] = {
|
||||
"OFF", "SCALE", "CLIP"
|
||||
};
|
||||
|
||||
static long cmsx_menuImu_onEnter(void)
|
||||
{
|
||||
pidProfileIndex = getCurrentPidProfileIndex();
|
||||
|
@ -230,6 +234,9 @@ static OSD_Entry cmsx_menuRateProfileEntries[] =
|
|||
{ "THRPID ATT", OME_FLOAT, NULL, &(OSD_FLOAT_t) { &rateProfile.dynThrPID, 0, 100, 1, 10}, 0 },
|
||||
{ "TPA BRKPT", OME_UINT16, NULL, &(OSD_UINT16_t){ &rateProfile.tpa_breakpoint, 1000, 2000, 10}, 0 },
|
||||
|
||||
{ "THR LIM TYPE",OME_TAB, NULL, &(OSD_TAB_t) { &rateProfile.throttle_limit_type, THROTTLE_LIMIT_TYPE_COUNT - 1, osdTableThrottleLimitType}, 0 },
|
||||
{ "THR LIM %", OME_UINT8, NULL, &(OSD_UINT8_t) { &rateProfile.throttle_limit_percent, 25, 100, 1}, 0 },
|
||||
|
||||
{ "BACK", OME_Back, NULL, NULL, 0 },
|
||||
{ NULL, OME_END, NULL, NULL, 0 }
|
||||
};
|
||||
|
|
|
@ -35,6 +35,7 @@ typedef enum {
|
|||
THROTTLE_LIMIT_TYPE_OFF = 0,
|
||||
THROTTLE_LIMIT_TYPE_SCALE,
|
||||
THROTTLE_LIMIT_TYPE_CLIP,
|
||||
THROTTLE_LIMIT_TYPE_COUNT // must be the last entry
|
||||
} throttleLimitType_e;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue