3 import com.nokia.symbian 1.1
10 initialPage: mainpageComponent
13 property Component dialogComponent
14 // property alias m: mainPage
20 ToolItem { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
21 // ToolItem { iconId: "icon-m-toolbar-home"; onClicked: pageStack.pop(); }
22 ToolItem { iconId: "icon-m-toolbar-view-menu"; onClicked: myMenu.open(); }
29 iconSource: "toolbar-back"
30 onClicked: mainWindow.pageStack.depth <= 1 ? Qt.quit() : mainWindow.pageStack.pop()
38 onElevatorChanged:{if(drone.confUseJoyStick) drone.pitch=elevator;}
39 onAileronChanged: {if(drone.confUseJoyStick) drone.roll=-1.0*aileron;}
40 onThrotleChanged: {if(drone.confUseJoyStick) drone.vVelocity=throtle;}
41 onRudderChanged: {if(drone.confUseJoyStick) drone.yaw=rudder;}
50 property bool connectingBoxVisible:true
51 //onEntered:(mainWindow.fullscreen=true)
57 // anchors.horizontalCenter:parent.horizontalCenter
58 width:drone.confFullScreen? parent.width:640 ;height:480*width/640;
65 visible:drone.confShowHorizon
67 pitch:drone.dronePitch
69 alt:drone.droneAltitude
70 indicatorColor:"#00FF00"
72 groundColor:"#00000000"
81 // visible:drone.confUseAccel
85 text: "cmd:pitch=" + drone.pitch.toFixed(2) + " roll= " + drone.roll.toFixed(2) + " yaw=" + drone.yaw.toFixed(2) + " vv= " + drone.vVelocity.toFixed(2)
90 visible:drone.confShowDebug
94 text: "pitch=" + drone.dronePitch.toFixed(2) + " roll= " + drone.droneRoll.toFixed(2) + "yaw=" + drone.droneYaw.toFixed(2) + " alt= " + drone.droneAltitude.toFixed(2)
99 visible:drone.confShowDebug
103 text: drone.decodedStatus
109 z:2 // This is visible even connecting to drone
110 iconSource: "gear32x32.png"
111 onClicked:{ //mainWindow.fullscreen = false ;
112 pageStack.push(dialogComponent);
118 visible:drone.confShowJSIndicators&js.haveJoyStick&drone.confUseJoyStick
125 anchors.bottom: parent.bottom
140 visible:drone.confShowJSIndicators&js.haveJoyStick&drone.confUseJoyStick
147 anchors.bottom: parent.bottom
161 width:200;height:200;
163 visible: !drone.confUseAccel & !drone.confUseJoyStick
164 anchors.left:parent.left
165 anchors.bottom:parent.bottom
168 onYvChanged:{drone.vVelocity=-1*yv/200.0;}
169 onXvChanged:{drone.yaw=xv/200.0;}
170 onPressedChanged: { drone.ctrlActive=pressed;}
174 visible: !drone.confUseJoyStick
178 anchors.right:parent.right
179 anchors.bottom:parent.bottom
180 width:200;height:200;
182 onYvChanged:{drone.pitch=yv/200.0;}
183 onXvChanged:{drone.roll=xv/200.0;}
188 anchors.right:parent.right
189 anchors.rightMargin: 10
193 val:drone.pwm_motor1;
198 val:drone.pwm_motor2;
203 val:drone.pwm_motor3;
208 val:drone.pwm_motor4;
223 anchors.bottom:parent.bottom
227 onClicked:{drone.fly=checked;
228 // mainWindow.fullsecreen=checked;
235 anchors.top:parent.top
240 onClicked:{drone.emergency=checked;}
247 console.log("Connected to drone");
248 connectingDialog.accept();}
252 titleText:"Connecting to Drone"
253 message:"Connecting to Drone "+ drone.confDroneIp
254 acceptButtonText:"OK"
255 Component.onCompleted: {
256 console.log("ConectionDialog Opened");
257 if(!drone.connected) open(); }
262 Component.onCompleted: {
263 if (mainpageComponent.status != Component.Ready)
264 // pageStack.push(mainpageComponent);
266 console.log("Error loading component:", mainpageComponent.errorString());
267 dialogComponent = Qt.createComponent("ConfigDialogSymbian.qml");