mavlink USB auto start/stop on boards with VBUS

- no longer start sercon or mavlink usb by default
 - on USB connection (VBUS) monitor serial USB at low rate and start Mavlink if there's a HEARTBEAT or nshterm on 3 consecutive carriage returns
 - the mavlink USB instance is automatically stopped and serdis executed if USB is disconnected
 - skipping Mavlink USB (and sercon) saves a considerable amount of memory on older boards
This commit is contained in:
Daniel Agar
2021-10-03 15:32:54 -04:00
committed by GitHub
parent 07e307b074
commit 6d78054f50
46 changed files with 447 additions and 453 deletions
+1 -1
View File
@@ -3179,7 +3179,7 @@ MavlinkReceiver::run()
ssize_t nread = 0;
hrt_abstime last_send_update = 0;
while (!_mavlink->_task_should_exit) {
while (!_mavlink->should_exit()) {
// check for parameter updates
if (_parameter_update_sub.updated()) {