mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 14:07:34 +08:00
add oneshot mode capability
change fmu to task increase fmu_servo task priority to max and enable true oneshot use lowest FMU priority which minimizes jitter constrain oneshot updates to control group 0 events
This commit is contained in:
committed by
Lorenz Meier
parent
eac72051b8
commit
aa9fbbedd5
@@ -61,6 +61,7 @@
|
||||
#include "systemlib/err.h"
|
||||
#include "systemlib/param/param.h"
|
||||
#include "drivers/drv_pwm_output.h"
|
||||
#include "drivers/stm32/drv_io_timer.h"
|
||||
|
||||
static void usage(const char *reason);
|
||||
__EXPORT int pwm_main(int argc, char *argv[]);
|
||||
@@ -617,6 +618,7 @@ pwm_main(int argc, char *argv[])
|
||||
warnx("Press CTRL-C or 'c' to abort.");
|
||||
|
||||
while (1) {
|
||||
|
||||
for (unsigned i = 0; i < servo_count; i++) {
|
||||
if (set_mask & 1 << i) {
|
||||
ret = px4_ioctl(fd, PWM_SERVO_SET(i), pwm_value);
|
||||
@@ -654,7 +656,7 @@ pwm_main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
usleep(2000);
|
||||
usleep(2500);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user