mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 23:53:34 +08:00
params: use PWM_MAIN_* instead of PWM_FMU_*
This commit is contained in:
@@ -140,7 +140,12 @@ private:
|
||||
|
||||
void update_telemetry_num_motors();
|
||||
|
||||
MixingOutput _mixing_output{"PWM_FMU", DIRECT_PWM_OUTPUT_CHANNELS, *this, MixingOutput::SchedulingPolicy::Auto, false, false};
|
||||
#ifdef BOARD_WITH_IO
|
||||
# define PARAM_PREFIX "PWM_AUX"
|
||||
#else
|
||||
# define PARAM_PREFIX "PWM_MAIN"
|
||||
#endif
|
||||
MixingOutput _mixing_output {PARAM_PREFIX, DIRECT_PWM_OUTPUT_CHANNELS, *this, MixingOutput::SchedulingPolicy::Auto, false, false};
|
||||
|
||||
Telemetry *_telemetry{nullptr};
|
||||
|
||||
|
||||
@@ -130,7 +130,12 @@ private:
|
||||
|
||||
static const int MAX_PER_INSTANCE{8};
|
||||
|
||||
MixingOutput _mixing_output{"PWM_FMU", FMU_MAX_ACTUATORS, *this, MixingOutput::SchedulingPolicy::Auto, true};
|
||||
#ifdef BOARD_WITH_IO
|
||||
# define PARAM_PREFIX "PWM_AUX"
|
||||
#else
|
||||
# define PARAM_PREFIX "PWM_MAIN"
|
||||
#endif
|
||||
MixingOutput _mixing_output {PARAM_PREFIX, FMU_MAX_ACTUATORS, *this, MixingOutput::SchedulingPolicy::Auto, true};
|
||||
|
||||
uint32_t _backup_schedule_interval_us{1_s};
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ module_name: PWM Output
|
||||
actuator_output:
|
||||
output_groups:
|
||||
- generator: pwm
|
||||
param_prefix: PWM_FMU
|
||||
channel_labels: ['PWM Main', 'PWM Capture']
|
||||
param_prefix: '${PWM_MAIN_OR_AUX}'
|
||||
channel_labels: ['${PWM_MAIN_OR_AUX}', 'PWM Capture']
|
||||
standard_params:
|
||||
disarmed: { min: 800, max: 2200, default: 900 }
|
||||
min: { min: 800, max: 1400, default: 1000 }
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
|
||||
#if defined(CONFIG_ARCH_BOARD_PX4_SITL)
|
||||
#define PARAM_PREFIX "PWM_FMU"
|
||||
#define PARAM_PREFIX "PWM_MAIN"
|
||||
#else
|
||||
#define PARAM_PREFIX "HIL_ACT"
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
module_name: PWM Sim
|
||||
actuator_output:
|
||||
output_groups:
|
||||
- param_prefix: ${PWM_FMU_OR_HIL}
|
||||
channel_label: ${PWM_FMU_OR_HIL}
|
||||
- param_prefix: ${PWM_MAIN_OR_HIL}
|
||||
channel_label: ${PWM_MAIN_OR_HIL}
|
||||
num_channels: 16
|
||||
|
||||
|
||||
@@ -79,6 +79,9 @@ endif()
|
||||
if(PX4_ETHERNET)
|
||||
set(added_arguments --ethernet)
|
||||
endif()
|
||||
if(config_io_board)
|
||||
set(board_with_io_arg --board-with-io)
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${generated_serial_params_file} ${generated_module_params_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${generated_params_dir}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
@@ -87,7 +90,7 @@ add_custom_command(OUTPUT ${generated_serial_params_file} ${generated_module_par
|
||||
--config-files ${module_config_files} #--verbose
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/module_config/generate_params.py
|
||||
--params-file ${generated_module_params_file}
|
||||
${added_arguments}
|
||||
${added_arguments} ${board_with_io_arg}
|
||||
--timer-config ${PX4_BOARD_DIR}/src/timer_config.cpp
|
||||
--config-files ${module_config_files} #--verbose
|
||||
--board ${PX4_BOARD}
|
||||
|
||||
@@ -63,63 +63,6 @@ parameters:
|
||||
max: 2200
|
||||
default: 1500
|
||||
|
||||
PWM_AUX_MIN${i}:
|
||||
description:
|
||||
short: PWM aux ${i} minimum value
|
||||
long: |
|
||||
This is the minimum PWM pulse the autopilot is allowed to output.
|
||||
When set to -1 the value for PWM_AUX_MIN will be used
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 1600
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_AUX_MAX${i}:
|
||||
description:
|
||||
short: PWM aux ${i} maximum value
|
||||
long: |
|
||||
This is the maximum PWM pulse the autopilot is allowed to output.
|
||||
When set to -1 the value for PWM_AUX_MAX will be used
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 2150
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_AUX_FAIL${i}:
|
||||
description:
|
||||
short: PWM aux ${i} failsafe value
|
||||
long: |
|
||||
This is the PWM pulse the autopilot is outputting if in failsafe mode.
|
||||
When set to -1 the value is set automatically depending if the actuator
|
||||
is a motor (900us) or a servo (1500us)
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 2150
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_AUX_DIS${i}:
|
||||
description:
|
||||
short: PWM aux ${i} disarmed value
|
||||
long: |
|
||||
This is the PWM pulse the autopilot is outputting if not armed.
|
||||
When set to -1 the value for PWM_AUX_DISARM will be used
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 2150
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_AUX_TRIM${i}:
|
||||
description:
|
||||
short: PWM aux ${i} trim value
|
||||
|
||||
@@ -63,63 +63,6 @@ parameters:
|
||||
max: 2200
|
||||
default: 900
|
||||
|
||||
PWM_MAIN_MIN${i}:
|
||||
description:
|
||||
short: PWM main ${i} minimum value
|
||||
long: |
|
||||
This is the minimum PWM pulse the autopilot is allowed to output.
|
||||
When set to -1 the value for PWM_MAIN_MIN will be used
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 1600
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_MAIN_MAX${i}:
|
||||
description:
|
||||
short: PWM main ${i} maximum value
|
||||
long: |
|
||||
This is the maximum PWM pulse the autopilot is allowed to output.
|
||||
When set to -1 the value for PWM_MAIN_MAX will be used
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 2150
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_MAIN_FAIL${i}:
|
||||
description:
|
||||
short: PWM main ${i} failsafe value
|
||||
long: |
|
||||
This is the PWM pulse the autopilot is outputting if in failsafe mode.
|
||||
When set to -1 the value is set automatically depending if the actuator
|
||||
is a motor (900us) or a servo (1500us)
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 2150
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_MAIN_DIS${i}:
|
||||
description:
|
||||
short: PWM main ${i} disarmed value
|
||||
long: |
|
||||
This is the PWM pulse the autopilot is outputting if not armed.
|
||||
When set to -1 the value for PWM_MAIN_DISARM will be used
|
||||
type: int32
|
||||
unit: us
|
||||
min: -1
|
||||
max: 2150
|
||||
num_instances: *max_num_config_instances
|
||||
instance_start: 1
|
||||
default: -1
|
||||
|
||||
PWM_MAIN_TRIM${i}:
|
||||
description:
|
||||
short: PWM main ${i} trim value
|
||||
|
||||
Reference in New Issue
Block a user