2 import com.nokia.symbian 1.1
9 initialPage: mainpageComponent
12 property Component dialogComponent
13 // property alias m: mainPage
19 ToolItem { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
20 // ToolItem { iconId: "icon-m-toolbar-home"; onClicked: pageStack.pop(); }
21 ToolItem { iconId: "icon-m-toolbar-view-menu"; onClicked: myMenu.open(); }
28 iconSource: "toolbar-back"
29 onClicked: mainWindow.pageStack.depth <= 1 ? Qt.quit() : mainWindow.pageStack.pop()
37 onElevatorChanged:{if(drone.confUseJoyStick) drone.pitch=elevator;}
38 onAileronChanged: {if(drone.confUseJoyStick) drone.roll=-1.0*aileron;}
39 onThrotleChanged: {if(drone.confUseJoyStick) drone.vVelocity=throtle;}
40 onRudderChanged: {if(drone.confUseJoyStick) drone.yaw=rudder;}
49 property bool connectingBoxVisible:true
50 //onEntered:(mainWindow.fullscreen=true)
56 // anchors.horizontalCenter:parent.horizontalCenter
57 width:drone.confFullScreen? parent.width:640 ;height:480*width/640;
64 visible:drone.confShowHorizon
66 pitch:drone.dronePitch
68 alt:drone.droneAltitude
69 indicatorColor:"#00FF00"
71 groundColor:"#00000000"
80 // visible:drone.confUseAccel
84 text: "cmd:pitch=" + drone.pitch.toFixed(2) + " roll= " + drone.roll.toFixed(2) + " yaw=" + drone.yaw.toFixed(2) + " vv= " + drone.vVelocity.toFixed(2)
89 visible:drone.confShowDebug
93 text: "pitch=" + drone.dronePitch.toFixed(2) + " roll= " + drone.droneRoll.toFixed(2) + "yaw=" + drone.droneYaw.toFixed(2) + " alt= " + drone.droneAltitude.toFixed(2)
98 visible:drone.confShowDebug
102 text: drone.decodedStatus
108 z:2 // This is visible even connecting to drone
109 iconSource: "gear32x32.png"
110 onClicked:{ //mainWindow.fullscreen = false ;
111 pageStack.push(dialogComponent);
117 visible:drone.confShowJSIndicators&js.haveJoyStick&drone.confUseJoyStick
124 anchors.bottom: parent.bottom
139 visible:drone.confShowJSIndicators&js.haveJoyStick&drone.confUseJoyStick
146 anchors.bottom: parent.bottom
160 width:200;height:200;
162 visible: !drone.confUseAccel & !drone.confUseJoyStick
163 anchors.left:parent.left
164 anchors.bottom:parent.bottom
167 onYvChanged:{drone.vVelocity=-1*yv/200.0;}
168 onXvChanged:{drone.yaw=xv/200.0;}
169 onPressedChanged: { drone.ctrlActive=pressed;}
173 visible: !drone.confUseJoyStick
177 anchors.right:parent.right
178 anchors.bottom:parent.bottom
179 width:200;height:200;
181 onYvChanged:{drone.pitch=yv/200.0;}
182 onXvChanged:{drone.roll=xv/200.0;}
187 anchors.right:parent.right
188 anchors.rightMargin: 10
192 val:drone.pwm_motor1;
197 val:drone.pwm_motor2;
202 val:drone.pwm_motor3;
207 val:drone.pwm_motor4;
222 anchors.bottom:parent.bottom
226 onClicked:{drone.fly=checked;
227 // mainWindow.fullsecreen=checked;
234 anchors.top:parent.top
239 onClicked:{drone.emergency=checked;}
246 console.log("Connected to drone");
247 connectingDialog.accept();}
251 titleText:"Connecting to Drone"
252 message:"Connecting to Drone "+ drone.confDroneIp
253 acceptButtonText:"OK"
254 Component.onCompleted: {
255 console.log("ConectionDialog Opened");
256 if(!drone.connected) open(); }
261 Component.onCompleted: {
262 if (mainpageComponent.status != Component.Ready)
263 // pageStack.push(mainpageComponent);
265 console.log("Error loading component:", mainpageComponent.errorString());
266 dialogComponent = Qt.createComponent("ConfigDialogSymbian.qml");