consume all available queued vehicle_commands

This commit is contained in:
Daniel Agar
2021-01-24 13:42:35 -05:00
parent d5c7e243a9
commit d1dfa26903
11 changed files with 167 additions and 175 deletions
+1 -1
View File
@@ -2415,7 +2415,7 @@ Commander::run()
}
/* handle commands last, as the system needs to be updated to handle them */
if (_cmd_sub.updated()) {
while (_cmd_sub.updated()) {
/* got command */
const unsigned last_generation = _cmd_sub.get_last_generation();
vehicle_command_s cmd;