mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 14:08:52 +08:00
pwm_limit: rename to output_limit
As there is nothing pwm-specific about it.
This commit is contained in:
@@ -42,6 +42,6 @@ px4_add_module(
|
||||
ocpoc_mmap.cpp
|
||||
bbblue_pwm_rc.cpp
|
||||
DEPENDS
|
||||
pwm_limit
|
||||
output_limit
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <lib/mixer/mixer_load.h>
|
||||
#include <parameters/param.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
#include <output_limit/output_limit.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include "common.h"
|
||||
@@ -98,7 +98,7 @@ px4_pollfd_struct_t _poll_fds[actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS];
|
||||
uint32_t _groups_required = 0;
|
||||
uint32_t _groups_subscribed = 0;
|
||||
|
||||
pwm_limit_t _pwm_limit;
|
||||
output_limit_t _pwm_limit;
|
||||
|
||||
// esc parameters
|
||||
int32_t _pwm_disarmed;
|
||||
@@ -268,7 +268,7 @@ void task_main(int argc, char *argv[])
|
||||
_armed.armed = false;
|
||||
_armed.prearmed = false;
|
||||
|
||||
pwm_limit_init(&_pwm_limit);
|
||||
output_limit_init(&_pwm_limit);
|
||||
|
||||
while (!_task_should_exit) {
|
||||
|
||||
@@ -332,7 +332,7 @@ void task_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Switch off the PWM limit ramp for the calibration. */
|
||||
_pwm_limit.state = PWM_LIMIT_STATE_ON;
|
||||
_pwm_limit.state = OUTPUT_LIMIT_STATE_ON;
|
||||
}
|
||||
|
||||
if (_mixer_group != nullptr) {
|
||||
@@ -358,16 +358,16 @@ void task_main(int argc, char *argv[])
|
||||
uint16_t pwm[actuator_outputs_s::NUM_ACTUATOR_OUTPUTS];
|
||||
|
||||
// TODO FIXME: pre-armed seems broken
|
||||
pwm_limit_calc(_armed.armed,
|
||||
false/*_armed.prearmed*/,
|
||||
_outputs.noutputs,
|
||||
reverse_mask,
|
||||
disarmed_pwm,
|
||||
min_pwm,
|
||||
max_pwm,
|
||||
_outputs.output,
|
||||
pwm,
|
||||
&_pwm_limit);
|
||||
output_limit_calc(_armed.armed,
|
||||
false/*_armed.prearmed*/,
|
||||
_outputs.noutputs,
|
||||
reverse_mask,
|
||||
disarmed_pwm,
|
||||
min_pwm,
|
||||
max_pwm,
|
||||
_outputs.output,
|
||||
pwm,
|
||||
&_pwm_limit);
|
||||
|
||||
if (_armed.lockdown || _armed.manual_lockdown) {
|
||||
pwm_out->send_output_pwm(disarmed_pwm, _outputs.noutputs);
|
||||
|
||||
Reference in New Issue
Block a user