The suggestion is to match the implmentation of
if statements, as demonstrated in other places in the file. This way, it will work (the code that is already there works, do the same thing and yours will too!). The way you have it right now, you enter the while loop, and you never come out of it, because the value of
held never changes inside of the loop. (connection is lost because the code running on the autopilot is completely hung, doing nothing spinning around inside of your while loop forever.
We always have to power on the vehicle and THEN open QGC in order to connect to the vehicle. So in the case that we lose connection, we must always restart QGC in order to establish connection again; is this normal?
This is not normal, it is probably related to your firmware bugs.