When first initialising the connection to the helicopter from the controller, the battery isn't connected (which is intended - we need to arm the ESC before we connect), but the Gyro, etc. therefore doesn't have the required power to boot up and provide a signal. This causes an error which crashes the connection to the controller.
Restarting the controller instance/connection works (assuming the battery has since been connected), but we should be able to initiate controller connection before powering up with the battery. This may require just running the Gyro, etc. off the Pi's 5V rail (if it'll take it), or moving most of the constructor admin out of the constructor and into an 'init' block which we can call after we've armed the ESC and are ready for the battery
When first initialising the connection to the helicopter from the controller, the battery isn't connected (which is intended - we need to arm the ESC before we connect), but the Gyro, etc. therefore doesn't have the required power to boot up and provide a signal. This causes an error which crashes the connection to the controller.
Restarting the controller instance/connection works (assuming the battery has since been connected), but we should be able to initiate controller connection before powering up with the battery. This may require just running the Gyro, etc. off the Pi's 5V rail (if it'll take it), or moving most of the constructor admin out of the constructor and into an 'init' block which we can call after we've armed the ESC and are ready for the battery