pwm_limit: rename to output_limit

As there is nothing pwm-specific about it.
This commit is contained in:
Beat Küng
2019-08-27 16:23:17 +02:00
committed by Daniel Agar
parent 1bee984bb0
commit a2ebbe9066
22 changed files with 1445 additions and 141 deletions
+1 -1
View File
@@ -52,5 +52,5 @@ target_link_libraries(px4iofirmware
mixer
rc
perf
pwm_limit
output_limit
)
+4 -4
View File
@@ -52,7 +52,7 @@
#include <drivers/drv_hrt.h>
#include <mixer/mixer.h>
#include <pwm_limit/pwm_limit.h>
#include <output_limit/output_limit.h>
#include <rc/sbus.h>
#include <uORB/topics/actuator_controls.h>
@@ -311,8 +311,8 @@ mixer_tick(void)
mixed = mixer_mix_threadsafe(&outputs[0], &r_mixer_limits);
/* the pwm limit call takes care of out of band errors */
pwm_limit_calc(should_arm, should_arm_nothrottle, mixed, r_setup_pwm_reverse, r_page_servo_disarmed,
r_page_servo_control_min, r_page_servo_control_max, outputs, r_page_servos, &pwm_limit);
output_limit_calc(should_arm, should_arm_nothrottle, mixed, r_setup_pwm_reverse, r_page_servo_disarmed,
r_page_servo_control_min, r_page_servo_control_max, outputs, r_page_servos, &pwm_limit);
/* clamp unused outputs to zero */
for (unsigned i = mixed; i < PX4IO_SERVO_COUNT; i++) {
@@ -482,7 +482,7 @@ mixer_callback(uintptr_t handle,
}
/* motor spinup phase - lock throttle to zero */
if ((pwm_limit.state == PWM_LIMIT_STATE_RAMP) || (should_arm_nothrottle && !should_arm)) {
if ((pwm_limit.state == OUTPUT_LIMIT_STATE_RAMP) || (should_arm_nothrottle && !should_arm)) {
if ((control_group == actuator_controls_s::GROUP_INDEX_ATTITUDE ||
control_group == actuator_controls_s::GROUP_INDEX_ATTITUDE_ALTERNATE) &&
control_index == actuator_controls_s::INDEX_THROTTLE) {
+3 -3
View File
@@ -55,7 +55,7 @@
#include <drivers/drv_hrt.h>
#include <perf/perf_counter.h>
#include <pwm_limit/pwm_limit.h>
#include <output_limit/output_limit.h>
#include <stm32_uart.h>
@@ -68,7 +68,7 @@ struct sys_state_s system_state;
static struct hrt_call serial_dma_call;
pwm_limit_t pwm_limit;
output_limit_t pwm_limit;
float dt;
@@ -338,7 +338,7 @@ user_start(int argc, char *argv[])
syslog(LOG_INFO, "MEM: free %u, largest %u\n", minfo.mxordblk, minfo.fordblks);
/* initialize PWM limit lib */
pwm_limit_init(&pwm_limit);
output_limit_init(&pwm_limit);
/*
* P O L I C E L I G H T S
+2 -2
View File
@@ -50,7 +50,7 @@
#include "protocol.h"
#include <pwm_limit/pwm_limit.h>
#include <output_limit/output_limit.h>
/*
hotfix: we are critically short of memory in px4io and this is the
@@ -160,7 +160,7 @@ extern bool update_trims;
/*
* PWM limit structure
*/
extern pwm_limit_t pwm_limit;
extern output_limit_t pwm_limit;
/*
* GPIO handling.
File diff suppressed because it is too large Load Diff
@@ -39,7 +39,5 @@ px4_add_module(
vtol_type.cpp
tailsitter.cpp
standard.cpp
DEPENDS
pwm_limit
)