Skip to content

Commit 224d022

Browse files
committed
tidy defines in RC_Channel
1 parent 5e5fde7 commit 224d022

File tree

3 files changed

+125
-35
lines changed

3 files changed

+125
-35
lines changed

ArduCopter/RC_Channel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ bool RC_Channel_Copter::do_aux_function(const AUX_FUNC ch_option, const AuxSwitc
366366
copter.ap.motor_interlock_switch = (ch_flag == AuxSwitchPos::HIGH || ch_flag == AuxSwitchPos::MIDDLE);
367367
#endif
368368
break;
369-
369+
370+
#if FRAME_CONFIG == HELI_FRAME
370371
case AUX_FUNC::TURBINE_START:
371-
#if FRAME_CONFIG == HELI_FRAME
372372
switch (ch_flag) {
373373
case AuxSwitchPos::HIGH:
374374
copter.motors->set_turb_start(true);
@@ -380,9 +380,9 @@ bool RC_Channel_Copter::do_aux_function(const AUX_FUNC ch_option, const AuxSwitc
380380
copter.motors->set_turb_start(false);
381381
break;
382382
}
383-
#endif
384383
break;
385-
384+
#endif
385+
386386
case AUX_FUNC::BRAKE:
387387
#if MODE_BRAKE_ENABLED == ENABLED
388388
do_aux_function_change_mode(Mode::Number::BRAKE, ch_flag);

ArduPlane/RC_Channel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ bool RC_Channel_Plane::do_aux_function(const AUX_FUNC ch_option, const AuxSwitch
342342
break;
343343
#endif
344344

345-
case AUX_FUNC::ARSPD_CALIBRATE:
346345
#if AP_AIRSPEED_AUTOCAL_ENABLE
346+
case AUX_FUNC::ARSPD_CALIBRATE:
347347
switch (ch_flag) {
348348
case AuxSwitchPos::HIGH:
349349
plane.airspeed.set_calibration_enabled(true);
@@ -354,8 +354,8 @@ bool RC_Channel_Plane::do_aux_function(const AUX_FUNC ch_option, const AuxSwitch
354354
plane.airspeed.set_calibration_enabled(false);
355355
break;
356356
}
357-
#endif
358357
break;
358+
#endif
359359

360360
case AUX_FUNC::LANDING_FLARE:
361361
do_aux_function_flare(ch_flag);

0 commit comments

Comments
 (0)