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-03-23 08:28:15 +01:00
committed by Lorenz Meier
parent eac72051b8
commit aa9fbbedd5
10 changed files with 717 additions and 552 deletions
+4 -2
View File
@@ -951,7 +951,7 @@ PX4IO::task_main()
* primary PWM output or not.
*/
_t_actuator_controls_0 = orb_subscribe(ORB_ID(actuator_controls_0));
orb_set_interval(_t_actuator_controls_0, 20); /* default to 50Hz */
// orb_set_interval(_t_actuator_controls_0, 20); /* default to 50Hz */
_t_actuator_controls_1 = orb_subscribe(ORB_ID(actuator_controls_1));
orb_set_interval(_t_actuator_controls_1, 33); /* default to 30Hz */
_t_actuator_controls_2 = orb_subscribe(ORB_ID(actuator_controls_2));
@@ -3527,6 +3527,8 @@ test(void)
}
}
usleep(250);
/* readback servo values */
for (unsigned i = 0; i < servo_count; i++) {
servo_position_t value;
@@ -3536,7 +3538,7 @@ test(void)
}
if (value != servos[i]) {
errx(1, "servo %u readback error, got %hu expected %hu", i, value, servos[i]);
warnx("servo %u readback error, got %hu expected %hu", i, value, servos[i]);
}
}