This code is flyable, but a few problems exist which cause values in the .config files to be overwritten by the defaults in the .XML file.

This commit is contained in:
jwilson
2016-02-19 16:59:49 +01:00
committed by Julian Oes
parent 8cc37db595
commit d84639f8c4
7 changed files with 171 additions and 16 deletions
@@ -839,6 +839,9 @@ MulticopterAttitudeControl::task_main()
continue;
}
// TODO-JYW: TESTING-TESTING:
warnx("_ctrl_state_sub is producing data");
/* this is undesirable but not much we can do - might want to flag unhappy status */
if (pret < 0) {
warn("mc att ctrl: poll error %d, %d", pret, errno);
@@ -884,6 +887,9 @@ MulticopterAttitudeControl::task_main()
}
}
// TODO-JYW: TESTING-TESTING:
warnx("_v_control_mode.flag_control_attitude_enabled: %d", _v_control_mode.flag_control_attitude_enabled);
if (_v_control_mode.flag_control_attitude_enabled) {
if (_ts_opt_recovery == nullptr) {
@@ -953,6 +959,9 @@ MulticopterAttitudeControl::task_main()
}
}
// TODO-JYW: TESTING-TESTING:
warnx("_v_control_mode.flag_control_rates_enabled: %d", _v_control_mode.flag_control_rates_enabled);
if (_v_control_mode.flag_control_rates_enabled) {
control_attitude_rates(dt);
@@ -969,8 +978,15 @@ MulticopterAttitudeControl::task_main()
_controller_status.yaw_rate_integ = _rates_int(2);
_controller_status.timestamp = hrt_absolute_time();
// TODO-JYW: TESTING-TESTING:
warnx("_actuators_0_circuit_breaker_enabled: %d", _actuators_0_circuit_breaker_enabled);
if (!_actuators_0_circuit_breaker_enabled) {
if (_actuators_0_pub != nullptr) {
// TODO-JYW: TESTING-TESTING:
warnx("publishing actuator controls");
orb_publish(_actuators_id, _actuators_0_pub, &_actuators);
perf_end(_controller_latency_perf);