mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 04:01:36 +08:00
output modules: add param prefix argument to MixingOutput
This commit is contained in:
@@ -66,7 +66,7 @@ static const FunctionProvider all_function_providers[] = {
|
||||
{OutputFunction::Gimbal_Roll, OutputFunction::Gimbal_Yaw, &FunctionGimbal::allocate},
|
||||
};
|
||||
|
||||
MixingOutput::MixingOutput(uint8_t max_num_outputs, OutputModuleInterface &interface,
|
||||
MixingOutput::MixingOutput(const char *param_prefix, uint8_t max_num_outputs, OutputModuleInterface &interface,
|
||||
SchedulingPolicy scheduling_policy,
|
||||
bool support_esc_calibration, bool ramp_up)
|
||||
: ModuleParams(&interface),
|
||||
@@ -80,7 +80,8 @@ _scheduling_policy(scheduling_policy),
|
||||
_support_esc_calibration(support_esc_calibration),
|
||||
_max_num_outputs(max_num_outputs < MAX_ACTUATORS ? max_num_outputs : MAX_ACTUATORS),
|
||||
_interface(interface),
|
||||
_control_latency_perf(perf_alloc(PC_ELAPSED, "control latency"))
|
||||
_control_latency_perf(perf_alloc(PC_ELAPSED, "control latency")),
|
||||
_param_prefix(param_prefix)
|
||||
{
|
||||
output_limit_init(&_output_limit);
|
||||
_output_limit.ramp_up = ramp_up;
|
||||
|
||||
@@ -101,13 +101,15 @@ public:
|
||||
|
||||
/**
|
||||
* Contructor
|
||||
* @param param_prefix for min/max/etc. params, e.g. "PWM_MAIN". This needs to match 'param_prefix' in the module.yaml
|
||||
* @param max_num_outputs maximum number of supported outputs
|
||||
* @param interface Parent module for scheduling, parameter updates and callbacks
|
||||
* @param scheduling_policy
|
||||
* @param support_esc_calibration true if the output module supports ESC calibration via max, then min setting
|
||||
* @param ramp_up true if motor ramp up from disarmed to min upon arming is wanted
|
||||
*/
|
||||
MixingOutput(uint8_t max_num_outputs, OutputModuleInterface &interface, SchedulingPolicy scheduling_policy,
|
||||
MixingOutput(const char *param_prefix, uint8_t max_num_outputs, OutputModuleInterface &interface,
|
||||
SchedulingPolicy scheduling_policy,
|
||||
bool support_esc_calibration, bool ramp_up = true);
|
||||
|
||||
~MixingOutput();
|
||||
|
||||
Reference in New Issue
Block a user