mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 04:10:34 +08:00
tap_esc: disable the _mode param, use the number of configured channels instead
Not sure why the Mode enum exists in the first place...
This commit is contained in:
@@ -163,7 +163,7 @@ TAP_ESC::TAP_ESC(int channels_count):
|
||||
CDev("tap_esc", TAP_ESC_DEVICE_PATH),
|
||||
_is_armed(false),
|
||||
_poll_fds_num(0),
|
||||
_mode(MODE_4PWM),
|
||||
_mode(MODE_4PWM), //FIXME: what is this mode used for???
|
||||
_armed_sub(-1),
|
||||
_test_motor_sub(-1),
|
||||
_outputs_pub(nullptr),
|
||||
@@ -623,8 +623,10 @@ TAP_ESC::cycle()
|
||||
}
|
||||
}
|
||||
|
||||
size_t num_outputs = 0;
|
||||
size_t num_outputs = _channels_count;
|
||||
|
||||
/*
|
||||
// FIXME: don't know what this mode should be used for. It's hardcoded in initialization and never changed.
|
||||
switch (_mode) {
|
||||
case MODE_2PWM:
|
||||
num_outputs = 2;
|
||||
@@ -646,6 +648,7 @@ TAP_ESC::cycle()
|
||||
num_outputs = 0;
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
/* can we mix? */
|
||||
if (_is_armed && _mixers != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user