RC_Channel: refactor KILL_IMU of do_aux_function

This commit is contained in:
Tatsuya Yamaguchi 2021-05-28 11:18:44 +09:00 committed by Peter Barker
parent 6f81c250be
commit e63918d9ba
1 changed files with 2 additions and 10 deletions

View File

@ -1097,19 +1097,11 @@ bool RC_Channel::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos
#if !HAL_MINIMIZE_FEATURES
case AUX_FUNC::KILL_IMU1:
if (ch_flag == AuxSwitchPos::HIGH) {
AP::ins().kill_imu(0, true);
} else {
AP::ins().kill_imu(0, false);
}
AP::ins().kill_imu(0, ch_flag == AuxSwitchPos::HIGH);
break;
case AUX_FUNC::KILL_IMU2:
if (ch_flag == AuxSwitchPos::HIGH) {
AP::ins().kill_imu(1, true);
} else {
AP::ins().kill_imu(1, false);
}
AP::ins().kill_imu(1, ch_flag == AuxSwitchPos::HIGH);
break;
#endif // HAL_MINIMIZE_FEATURES