Skip to content

Commit fd40892

Browse files
shellixyzdigitalentity
authored andcommitted
Replace PASSTHROUGH with MANUAL flight mode (FW) (#2661)
* FW: add manual flight mode * manual mode: separate roll and pitch expo * manual flight mode: cleaning * replace PASSTHRU mode with MANUAL mode * manual mode: merge pitch and roll expo * manual mode: add OSD menu for manual rates and expo * manual mode: forgot to add yaw rate adjustment in OSD menu * manual mode: add adjustments * manual mode: move rates applications in fc_core * group controlRateConfig settings by function * group controlRateConfig settings by function: fix ALIENFLIGHTF3 default rates config * manual mode rc adjustments: adapt to fc72312 changes * manual mode: clean rc adjustments * add new MSPv2 messages: MSP2_INAV_RATE_PROFILE and MSP2_INAV_SET_RATE_PROFILE
1 parent a9bf945 commit fd40892

29 files changed

Lines changed: 354 additions & 156 deletions

src/main/blackbox/blackbox.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,15 +1383,15 @@ static bool blackboxWriteSysinfo(void)
13831383
BLACKBOX_PRINT_HEADER_LINE("looptime", "%d", getPidUpdateRate());
13841384
BLACKBOX_PRINT_HEADER_LINE("gyro_sync_denom", "%d", gyroConfig()->gyroSyncDenominator);
13851385
BLACKBOX_PRINT_HEADER_LINE("rc_rate", "%d", 100); //For compatibility reasons write rc_rate 100
1386-
BLACKBOX_PRINT_HEADER_LINE("rc_expo", "%d", currentControlRateProfile->rcExpo8);
1387-
BLACKBOX_PRINT_HEADER_LINE("rc_yaw_expo", "%d", currentControlRateProfile->rcYawExpo8);
1388-
BLACKBOX_PRINT_HEADER_LINE("thr_mid", "%d", currentControlRateProfile->thrMid8);
1389-
BLACKBOX_PRINT_HEADER_LINE("thr_expo", "%d", currentControlRateProfile->thrExpo8);
1390-
BLACKBOX_PRINT_HEADER_LINE("tpa_rate", "%d", currentControlRateProfile->dynThrPID);
1391-
BLACKBOX_PRINT_HEADER_LINE("tpa_breakpoint", "%d", currentControlRateProfile->tpa_breakpoint);
1392-
BLACKBOX_PRINT_HEADER_LINE("rates", "%d,%d,%d", currentControlRateProfile->rates[ROLL],
1393-
currentControlRateProfile->rates[PITCH],
1394-
currentControlRateProfile->rates[YAW]);
1386+
BLACKBOX_PRINT_HEADER_LINE("rc_expo", "%d", currentControlRateProfile->stabilized.rcExpo8);
1387+
BLACKBOX_PRINT_HEADER_LINE("rc_yaw_expo", "%d", currentControlRateProfile->stabilized.rcYawExpo8);
1388+
BLACKBOX_PRINT_HEADER_LINE("thr_mid", "%d", currentControlRateProfile->throttle.rcMid8);
1389+
BLACKBOX_PRINT_HEADER_LINE("thr_expo", "%d", currentControlRateProfile->throttle.rcExpo8);
1390+
BLACKBOX_PRINT_HEADER_LINE("tpa_rate", "%d", currentControlRateProfile->throttle.dynPID);
1391+
BLACKBOX_PRINT_HEADER_LINE("tpa_breakpoint", "%d", currentControlRateProfile->throttle.pa_breakpoint);
1392+
BLACKBOX_PRINT_HEADER_LINE("rates", "%d,%d,%d", currentControlRateProfile->stabilized.rates[ROLL],
1393+
currentControlRateProfile->stabilized.rates[PITCH],
1394+
currentControlRateProfile->stabilized.rates[YAW]);
13951395
BLACKBOX_PRINT_HEADER_LINE("rollPID", "%d,%d,%d", pidBank()->pid[PID_ROLL].P,
13961396
pidBank()->pid[PID_ROLL].I,
13971397
pidBank()->pid[PID_ROLL].D);

src/main/cms/cms_menu_imu.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,35 @@ static CMS_Menu cmsx_menuPidGpsnav = {
259259
.entries = cmsx_menuPidGpsnavEntries,
260260
};
261261

262+
//
263+
// MANUAL Rate & Expo
264+
//
265+
static OSD_Entry cmsx_menuManualRateProfileEntries[] =
266+
{
267+
{ "-- MANUAL RATE --", OME_Label, NULL, profileIndexString, 0 },
268+
269+
OSD_SETTING_ENTRY("MANU ROLL RATE", SETTING_MANUAL_ROLL_RATE),
270+
OSD_SETTING_ENTRY("MANU PITCH RATE", SETTING_MANUAL_PITCH_RATE),
271+
OSD_SETTING_ENTRY("MANU YAW RATE", SETTING_MANUAL_YAW_RATE),
272+
273+
OSD_SETTING_ENTRY("MANU RC EXPO", SETTING_MANUAL_RC_EXPO),
274+
OSD_SETTING_ENTRY("MANU RC YAW EXP", SETTING_MANUAL_RC_YAW_EXPO),
275+
276+
{ "BACK", OME_Back, NULL, NULL, 0 },
277+
{ NULL, OME_END, NULL, NULL, 0 }
278+
};
279+
280+
static CMS_Menu cmsx_menuManualRateProfile = {
281+
#ifdef CMS_MENU_DEBUG
282+
.GUARD_text = "MENUMANURATE",
283+
.GUARD_type = OME_MENU,
284+
#endif
285+
.onEnter = NULL,
286+
.onExit = NULL,
287+
.onGlobalExit = NULL,
288+
.entries = cmsx_menuManualRateProfileEntries
289+
};
290+
262291
//
263292
// Rate & Expo
264293
//
@@ -423,6 +452,7 @@ static OSD_Entry cmsx_menuImuEntries[] =
423452
// Rate profile dependent
424453
{"RATE PROF", OME_UINT8, cmsx_profileIndexOnChange, &(OSD_UINT8_t){ &tmpProfileIndex, 1, MAX_CONTROL_RATE_PROFILE_COUNT, 1}, 0},
425454
{"RATE", OME_Submenu, cmsMenuChange, &cmsx_menuRateProfile, 0},
455+
{"MANU RATE", OME_Submenu, cmsMenuChange, &cmsx_menuManualRateProfile, 0},
426456

427457
// Global
428458
{"GYRO GLB", OME_Submenu, cmsMenuChange, &cmsx_menuGyro, 0},

src/main/fc/controlrate_profile.c

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,34 @@
3333
const controlRateConfig_t *currentControlRateProfile;
3434

3535

36-
PG_REGISTER_ARRAY_WITH_RESET_FN(controlRateConfig_t, MAX_CONTROL_RATE_PROFILE_COUNT, controlRateProfiles, PG_CONTROL_RATE_PROFILES, 0);
36+
PG_REGISTER_ARRAY_WITH_RESET_FN(controlRateConfig_t, MAX_CONTROL_RATE_PROFILE_COUNT, controlRateProfiles, PG_CONTROL_RATE_PROFILES, 1);
3737

3838
void pgResetFn_controlRateProfiles(controlRateConfig_t *instance)
3939
{
4040
for (int i = 0; i < MAX_CONTROL_RATE_PROFILE_COUNT; i++) {
4141
RESET_CONFIG(controlRateConfig_t, &instance[i],
42-
.rcExpo8 = 70,
43-
.thrMid8 = 50,
44-
.thrExpo8 = 0,
45-
.dynThrPID = 0,
46-
.rcYawExpo8 = 20,
47-
.tpa_breakpoint = 1500,
48-
.rates[FD_ROLL] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT,
49-
.rates[FD_PITCH] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT,
50-
.rates[FD_YAW] = CONTROL_RATE_CONFIG_YAW_RATE_DEFAULT
42+
.throttle = {
43+
.rcMid8 = 50,
44+
.rcExpo8 = 0,
45+
.dynPID = 0,
46+
.pa_breakpoint = 1500
47+
},
48+
49+
.stabilized = {
50+
.rcExpo8 = 70,
51+
.rcYawExpo8 = 20,
52+
.rates[FD_ROLL] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT,
53+
.rates[FD_PITCH] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT,
54+
.rates[FD_YAW] = CONTROL_RATE_CONFIG_YAW_RATE_DEFAULT,
55+
},
56+
57+
.manual = {
58+
.rcExpo8 = 70,
59+
.rcYawExpo8 = 20,
60+
.rates[FD_ROLL] = 100,
61+
.rates[FD_PITCH] = 100,
62+
.rates[FD_YAW] = 100
63+
}
5164
);
5265
}
5366
}

src/main/fc/controlrate_profile.h

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,26 @@ and so on.
4141
#define CONTROL_RATE_CONFIG_TPA_MAX 100
4242

4343
typedef struct controlRateConfig_s {
44-
uint16_t tpa_breakpoint; // Breakpoint where TPA is activated
45-
uint8_t rcExpo8;
46-
uint8_t thrMid8;
47-
uint8_t thrExpo8;
48-
uint8_t rates[3];
49-
uint8_t dynThrPID;
50-
uint8_t rcYawExpo8;
44+
45+
struct {
46+
uint8_t rcMid8;
47+
uint8_t rcExpo8;
48+
uint8_t dynPID;
49+
uint16_t pa_breakpoint; // Breakpoint where TPA is activated
50+
} throttle;
51+
52+
struct {
53+
uint8_t rcExpo8;
54+
uint8_t rcYawExpo8;
55+
uint8_t rates[3];
56+
} stabilized;
57+
58+
struct {
59+
uint8_t rcExpo8;
60+
uint8_t rcYawExpo8;
61+
uint8_t rates[3];
62+
} manual;
63+
5164
} controlRateConfig_t;
5265

5366
PG_DECLARE_ARRAY(controlRateConfig_t, MAX_CONTROL_RATE_PROFILE_COUNT, controlRateProfiles);

src/main/fc/fc_core.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,16 @@ void annexCode(void)
294294
}
295295
else {
296296
// Compute ROLL PITCH and YAW command
297-
rcCommand[ROLL] = getAxisRcCommand(rcData[ROLL], currentControlRateProfile->rcExpo8, rcControlsConfig()->deadband);
298-
rcCommand[PITCH] = getAxisRcCommand(rcData[PITCH], currentControlRateProfile->rcExpo8, rcControlsConfig()->deadband);
299-
rcCommand[YAW] = -getAxisRcCommand(rcData[YAW], currentControlRateProfile->rcYawExpo8, rcControlsConfig()->yaw_deadband);
297+
rcCommand[ROLL] = getAxisRcCommand(rcData[ROLL], FLIGHT_MODE(MANUAL_MODE) ? currentControlRateProfile->manual.rcExpo8 : currentControlRateProfile->stabilized.rcExpo8, rcControlsConfig()->deadband);
298+
rcCommand[PITCH] = getAxisRcCommand(rcData[PITCH], FLIGHT_MODE(MANUAL_MODE) ? currentControlRateProfile->manual.rcExpo8 : currentControlRateProfile->stabilized.rcExpo8, rcControlsConfig()->deadband);
299+
rcCommand[YAW] = -getAxisRcCommand(rcData[YAW], FLIGHT_MODE(MANUAL_MODE) ? currentControlRateProfile->manual.rcYawExpo8 : currentControlRateProfile->stabilized.rcYawExpo8, rcControlsConfig()->yaw_deadband);
300+
301+
// Apply manual control rates
302+
if (FLIGHT_MODE(MANUAL_MODE)) {
303+
rcCommand[ROLL] = rcCommand[ROLL] * currentControlRateProfile->manual.rates[FD_ROLL] / 100L;
304+
rcCommand[PITCH] = rcCommand[PITCH] * currentControlRateProfile->manual.rates[FD_PITCH] / 100L;
305+
rcCommand[YAW] = rcCommand[YAW] * currentControlRateProfile->manual.rates[FD_YAW] / 100L;
306+
}
300307

301308
//Compute THROTTLE command
302309
throttleValue = constrain(rcData[THROTTLE], rxConfig()->mincheck, PWM_RANGE_MAX);
@@ -561,19 +568,20 @@ void processRx(timeUs_t currentTimeUs)
561568

562569
// Handle passthrough mode
563570
if (STATE(FIXED_WING)) {
564-
if ((IS_RC_MODE_ACTIVE(BOXPASSTHRU) && !navigationRequiresAngleMode() && !failsafeRequiresAngleMode()) || // Normal activation of passthrough
571+
if ((IS_RC_MODE_ACTIVE(BOXMANUAL) && !navigationRequiresAngleMode() && !failsafeRequiresAngleMode()) || // Normal activation of passthrough
565572
(!ARMING_FLAG(ARMED) && isCalibrating())){ // Backup - if we are not armed - enforce passthrough while calibrating
566-
ENABLE_FLIGHT_MODE(PASSTHRU_MODE);
573+
ENABLE_FLIGHT_MODE(MANUAL_MODE);
567574
} else {
568-
DISABLE_FLIGHT_MODE(PASSTHRU_MODE);
575+
DISABLE_FLIGHT_MODE(MANUAL_MODE);
569576
}
577+
IS_RC_MODE_ACTIVE(BOXMANUAL) ? ENABLE_FLIGHT_MODE(MANUAL_MODE) : DISABLE_FLIGHT_MODE(MANUAL_MODE);
570578
}
571579

572580
/* In airmode Iterm should be prevented to grow when Low thottle and Roll + Pitch Centered.
573581
This is needed to prevent Iterm winding on the ground, but keep full stabilisation on 0 throttle while in air
574582
Low Throttle + roll and Pitch centered is assuming the copter is on the ground. Done to prevent complex air/ground detections */
575-
if (FLIGHT_MODE(PASSTHRU_MODE) || !ARMING_FLAG(ARMED)) {
576-
/* In PASSTHRU mode we reset integrators prevent I-term wind-up (PID output is not used in PASSTHRU) */
583+
if (FLIGHT_MODE(MANUAL_MODE) || !ARMING_FLAG(ARMED)) {
584+
/* In MANUAL mode we reset integrators prevent I-term wind-up (PID output is not used in MANUAL) */
577585
pidResetErrorAccumulators();
578586
}
579587
else {

src/main/fc/fc_msp.c

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,37 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
531531

532532
case MSP_RC_TUNING:
533533
sbufWriteU8(dst, 100); //rcRate8 kept for compatibity reasons, this setting is no longer used
534-
sbufWriteU8(dst, currentControlRateProfile->rcExpo8);
534+
sbufWriteU8(dst, currentControlRateProfile->stabilized.rcExpo8);
535535
for (int i = 0 ; i < 3; i++) {
536-
sbufWriteU8(dst, currentControlRateProfile->rates[i]); // R,P,Y see flight_dynamics_index_t
536+
sbufWriteU8(dst, currentControlRateProfile->stabilized.rates[i]); // R,P,Y see flight_dynamics_index_t
537+
}
538+
sbufWriteU8(dst, currentControlRateProfile->throttle.dynPID);
539+
sbufWriteU8(dst, currentControlRateProfile->throttle.rcMid8);
540+
sbufWriteU8(dst, currentControlRateProfile->throttle.rcExpo8);
541+
sbufWriteU16(dst, currentControlRateProfile->throttle.pa_breakpoint);
542+
sbufWriteU8(dst, currentControlRateProfile->stabilized.rcYawExpo8);
543+
break;
544+
545+
case MSP2_INAV_RATE_PROFILE:
546+
// throttle
547+
sbufWriteU8(dst, currentControlRateProfile->throttle.rcMid8);
548+
sbufWriteU8(dst, currentControlRateProfile->throttle.rcExpo8);
549+
sbufWriteU8(dst, currentControlRateProfile->throttle.dynPID);
550+
sbufWriteU16(dst, currentControlRateProfile->throttle.pa_breakpoint);
551+
552+
// stabilized
553+
sbufWriteU8(dst, currentControlRateProfile->stabilized.rcExpo8);
554+
sbufWriteU8(dst, currentControlRateProfile->stabilized.rcYawExpo8);
555+
for (uint8_t i = 0 ; i < 3; ++i) {
556+
sbufWriteU8(dst, currentControlRateProfile->stabilized.rates[i]); // R,P,Y see flight_dynamics_index_t
557+
}
558+
559+
// manual
560+
sbufWriteU8(dst, currentControlRateProfile->manual.rcExpo8);
561+
sbufWriteU8(dst, currentControlRateProfile->manual.rcYawExpo8);
562+
for (uint8_t i = 0 ; i < 3; ++i) {
563+
sbufWriteU8(dst, currentControlRateProfile->manual.rates[i]); // R,P,Y see flight_dynamics_index_t
537564
}
538-
sbufWriteU8(dst, currentControlRateProfile->dynThrPID);
539-
sbufWriteU8(dst, currentControlRateProfile->thrMid8);
540-
sbufWriteU8(dst, currentControlRateProfile->thrExpo8);
541-
sbufWriteU16(dst, currentControlRateProfile->tpa_breakpoint);
542-
sbufWriteU8(dst, currentControlRateProfile->rcYawExpo8);
543565
break;
544566

545567
case MSP_PID:
@@ -1348,23 +1370,23 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
13481370
if (dataSize >= 10) {
13491371
sbufReadU8(src); //Read rcRate8, kept for protocol compatibility reasons
13501372
// need to cast away const to set controlRateProfile
1351-
((controlRateConfig_t*)currentControlRateProfile)->rcExpo8 = sbufReadU8(src);
1373+
((controlRateConfig_t*)currentControlRateProfile)->stabilized.rcExpo8 = sbufReadU8(src);
13521374
for (int i = 0; i < 3; i++) {
13531375
rate = sbufReadU8(src);
13541376
if (i == FD_YAW) {
1355-
((controlRateConfig_t*)currentControlRateProfile)->rates[i] = constrain(rate, CONTROL_RATE_CONFIG_YAW_RATE_MIN, CONTROL_RATE_CONFIG_YAW_RATE_MAX);
1377+
((controlRateConfig_t*)currentControlRateProfile)->stabilized.rates[i] = constrain(rate, CONTROL_RATE_CONFIG_YAW_RATE_MIN, CONTROL_RATE_CONFIG_YAW_RATE_MAX);
13561378
}
13571379
else {
1358-
((controlRateConfig_t*)currentControlRateProfile)->rates[i] = constrain(rate, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MIN, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
1380+
((controlRateConfig_t*)currentControlRateProfile)->stabilized.rates[i] = constrain(rate, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MIN, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
13591381
}
13601382
}
13611383
rate = sbufReadU8(src);
1362-
((controlRateConfig_t*)currentControlRateProfile)->dynThrPID = MIN(rate, CONTROL_RATE_CONFIG_TPA_MAX);
1363-
((controlRateConfig_t*)currentControlRateProfile)->thrMid8 = sbufReadU8(src);
1364-
((controlRateConfig_t*)currentControlRateProfile)->thrExpo8 = sbufReadU8(src);
1365-
((controlRateConfig_t*)currentControlRateProfile)->tpa_breakpoint = sbufReadU16(src);
1384+
((controlRateConfig_t*)currentControlRateProfile)->throttle.dynPID = MIN(rate, CONTROL_RATE_CONFIG_TPA_MAX);
1385+
((controlRateConfig_t*)currentControlRateProfile)->throttle.rcMid8 = sbufReadU8(src);
1386+
((controlRateConfig_t*)currentControlRateProfile)->throttle.rcExpo8 = sbufReadU8(src);
1387+
((controlRateConfig_t*)currentControlRateProfile)->throttle.pa_breakpoint = sbufReadU16(src);
13661388
if (dataSize >= 11) {
1367-
((controlRateConfig_t*)currentControlRateProfile)->rcYawExpo8 = sbufReadU8(src);
1389+
((controlRateConfig_t*)currentControlRateProfile)->stabilized.rcYawExpo8 = sbufReadU8(src);
13681390
}
13691391

13701392
schedulePidGainsUpdate();
@@ -1373,6 +1395,45 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
13731395
}
13741396
break;
13751397

1398+
case MSP2_INAV_SET_RATE_PROFILE:
1399+
if (dataSize == 15) {
1400+
controlRateConfig_t *currentControlRateProfile_p = (controlRateConfig_t*)currentControlRateProfile; // need to cast away const to set controlRateProfile
1401+
1402+
// throttle
1403+
currentControlRateProfile_p->throttle.rcMid8 = sbufReadU8(src);
1404+
currentControlRateProfile_p->throttle.rcExpo8 = sbufReadU8(src);
1405+
currentControlRateProfile_p->throttle.dynPID = sbufReadU8(src);
1406+
currentControlRateProfile_p->throttle.pa_breakpoint = sbufReadU16(src);
1407+
1408+
// stabilized
1409+
currentControlRateProfile_p->stabilized.rcExpo8 = sbufReadU8(src);
1410+
currentControlRateProfile_p->stabilized.rcYawExpo8 = sbufReadU8(src);
1411+
for (uint8_t i = 0; i < 3; ++i) {
1412+
rate = sbufReadU8(src);
1413+
if (i == FD_YAW) {
1414+
currentControlRateProfile_p->stabilized.rates[i] = constrain(rate, CONTROL_RATE_CONFIG_YAW_RATE_MIN, CONTROL_RATE_CONFIG_YAW_RATE_MAX);
1415+
} else {
1416+
currentControlRateProfile_p->stabilized.rates[i] = constrain(rate, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MIN, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
1417+
}
1418+
}
1419+
1420+
// manual
1421+
currentControlRateProfile_p->manual.rcExpo8 = sbufReadU8(src);
1422+
currentControlRateProfile_p->manual.rcYawExpo8 = sbufReadU8(src);
1423+
for (uint8_t i = 0; i < 3; ++i) {
1424+
rate = sbufReadU8(src);
1425+
if (i == FD_YAW) {
1426+
currentControlRateProfile_p->manual.rates[i] = constrain(rate, CONTROL_RATE_CONFIG_YAW_RATE_MIN, CONTROL_RATE_CONFIG_YAW_RATE_MAX);
1427+
} else {
1428+
currentControlRateProfile_p->manual.rates[i] = constrain(rate, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MIN, CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
1429+
}
1430+
}
1431+
1432+
} else {
1433+
return MSP_RESULT_ERROR;
1434+
}
1435+
break;
1436+
13761437
case MSP_SET_MISC:
13771438
tmp = sbufReadU16(src);
13781439
if (tmp < 1600 && tmp > 1400)

src/main/fc/fc_msp_box.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT + 1] = {
4747
{ BOXCAMSTAB, "CAMSTAB;", 8 },
4848
{ BOXNAVRTH, "NAV RTH;", 10 }, // old GPS HOME
4949
{ BOXNAVPOSHOLD, "NAV POSHOLD;", 11 }, // old GPS HOLD
50-
{ BOXPASSTHRU, "PASSTHRU;", 12 },
50+
{ BOXMANUAL, "MANUAL;", 12 },
5151
{ BOXBEEPERON, "BEEPER;", 13 },
5252
{ BOXLEDLOW, "LEDLOW;", 15 },
5353
{ BOXLIGHTS, "LIGHTS;", 16 },
@@ -186,7 +186,7 @@ void initActiveBoxIds(void)
186186
#endif
187187

188188
if (STATE(FIXED_WING)) {
189-
activeBoxIds[activeBoxIdCount++] = BOXPASSTHRU;
189+
activeBoxIds[activeBoxIdCount++] = BOXMANUAL;
190190
activeBoxIds[activeBoxIdCount++] = BOXNAVLAUNCH;
191191
activeBoxIds[activeBoxIdCount++] = BOXAUTOTRIM;
192192
#if defined(AUTOTUNE_FIXED_WING)
@@ -256,7 +256,7 @@ void packBoxModeFlags(boxBitmask_t * mspBoxModeFlags)
256256
CHECK_ACTIVE_BOX(IS_ENABLED(FLIGHT_MODE(HEADFREE_MODE)), BOXHEADFREE);
257257
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXHEADADJ)), BOXHEADADJ);
258258
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXCAMSTAB)), BOXCAMSTAB);
259-
CHECK_ACTIVE_BOX(IS_ENABLED(FLIGHT_MODE(PASSTHRU_MODE)), BOXPASSTHRU);
259+
CHECK_ACTIVE_BOX(IS_ENABLED(FLIGHT_MODE(MANUAL_MODE)), BOXMANUAL);
260260
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXBEEPERON)), BOXBEEPERON);
261261
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLEDLOW)), BOXLEDLOW);
262262
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLIGHTS)), BOXLIGHTS);

0 commit comments

Comments
 (0)