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:
Mark Whitehorn
2017-02-14 10:08:14 -07:00
committed by Lorenz Meier
parent eac72051b8
commit aa9fbbedd5
10 changed files with 717 additions and 552 deletions
+3 -1
View File
@@ -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;