Skip to content
Snippets Groups Projects
Commit c55c9781 authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

tap_esc: reset outputs only when armed really changed (not on each topic update)

parent 40450681
No related branches found
No related tags found
No related merge requests found
......@@ -754,13 +754,15 @@ TAP_ESC::cycle()
if (updated) {
orb_copy(ORB_ID(actuator_armed), _armed_sub, &_armed);
if (_is_armed != _armed.armed) {
/* reset all outputs */
for (size_t i = 0; i < sizeof(_outputs.output) / sizeof(_outputs.output[0]); i++) {
_outputs.output[i] = NAN;
}
}
/* do not obey the lockdown value, as lockdown is for PWMSim */
_is_armed = _armed.armed;
/* reset all outputs */
for (size_t i = 0; i < sizeof(_outputs.output) / sizeof(_outputs.output[0]); i++) {
_outputs.output[i] = NAN;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment