Video record function added
[mardrone] / mardrone / ardrone_harmattan.qml
index 32d2fba..7451b9a 100644 (file)
@@ -25,6 +25,7 @@ PageStackWindow {
 
   DroneControl {
         id:drone
+  //      logSeq:initialPage.frameSeq
     }
   JoyStick {
       id:js
@@ -40,21 +41,28 @@ PageStackWindow {
 
       Page {
         id:mainPage
+        property int frameSeq:0
         property bool connectingBoxVisible:true
         //onEntered:(mainWindow.fullscreen=true)
 
         state:"Landscape"
         DroneVideo {
+            id:droneVideo
             y:0
             x:0
            // anchors.horizontalCenter:parent.horizontalCenter
             width:drone.confFullScreen? parent.width:640 ;height:480*width/640;
-        }
 
+        }
+        Binding {
+          target:drone
+          property:"logSeq"
+          value: droneVideo.frameSeq;
+        }
         EfisPFD {
             id:hudPDF
             y:0
-            x:100
+            anchors.horizontalCenter: parent.horizontalCenter
             visible:drone.confShowHorizon
             roll:drone.droneRoll
             pitch:drone.dronePitch
@@ -63,9 +71,7 @@ PageStackWindow {
             indicatorColor:"#00FF00"
             skyColor:"#00000000"
             groundColor:"#00000000"
-//            value:lj.xv
-//            value2:lj.yv
-            width:560;height:400;
+            width:500;height:400;
         }
 
 
@@ -211,8 +217,8 @@ PageStackWindow {
         }
 
         Button {
-            x:400
-            width:60
+            x:300
+            width:80
             id:flyButton
             anchors.bottom:parent.bottom
             anchors.margins:15
@@ -223,17 +229,35 @@ PageStackWindow {
             }
         }
         Button {
-            x:500
-            width:140
+            x:450
+            width:100
             id:emergencyButton
             anchors.bottom:parent.bottom
 
             anchors.margins:15
-            text:"Energency";
+            text:"Emrg";
             checkable:true
             onClicked:{drone.emergency=checked;}
         }
-
+        Button {
+            x:600;
+            width:100
+            id:recordButton
+            anchors.bottom:parent.bottom
+            anchors.margins:15
+            text:"Rec";
+            checkable:true
+            onClicked:{droneVideo.recVideo=checked; drone.logFileName=droneVideo.videoFileName; drone.recordLog=checked;}
+        }
+        Text {
+            y:700
+            anchors.bottom:parent.bottom
+       //     visible:droneVideo.recVideo
+            color: "#00FF00"
+            id: droneFrameSeq
+            font.pixelSize:25
+            text: droneVideo.videoFileName+ " "+droneVideo.frameSeq
+        }
 
             Connections {
                 target:drone