flightData.getLongitude().addSignalListener(missionDisplay.createTextLine("Longitude"));
flightData.getSpeedOverGround().addSignalListener(missionDisplay.createTextLine("Speed [km/h]"));
flightData.getCurrentWaypointIndex().addSignalListener(missionDisplay.createTextLine("Target waypoint ID"));
// On/off switch for the autopilot navigation modus
switchNavigation = new RadioButton(this, "Navigate", 40, 610) {
@Override public void switchOn() {
super.switchOn();
switchStabilize.switchOn();
switchHome.switchOff();
missionController.startMission();
}
@Override public void switchOff() {
super.switchOff();
missionController.stopMission();
}
};
// On/off switch for the autopilot return to home modus
switchHome = new RadioButton(this, "Go Home", 40, 660) {
@Override public void switchOn() {
super.switchOn();
switchNavigation.switchOff();
switchStabilize.switchOn();
missionController.goHome();
}
@Override public void switchOff() {
super.switchOff();
missionController.stopMission();
}
};
// On/off switch for the autopilot stabilization modus
switchStabilize = new RadioButton(this, "Stabilize", 40, 560) {
@Override public void switchOn() {
super.switchOn();
missionController.stopMission();
motionController.startStabilizing();
}