sync repo
[mardrone] / mardrone / JoyStickCalibratorDesktop.qml
index deb435e..5893d42 100644 (file)
@@ -9,7 +9,7 @@ Item {
     property int ctrlSize:40
     ListModel {
           id: axisMapModel
-          ListElement{ text:"Aileron";  mapAxis:1 }
+          ListElement { text:"Aileron";  mapAxis:1 }
           ListElement { text:"Elevator"; mapAxis:2 }
           ListElement { text:"Throtle";  mapAxis:3 }
           ListElement { text:"Rudder";   mapAxis:4 }
@@ -235,12 +235,13 @@ Item {
             }
             ComboBox {
                 id: axisMap1UICombo;
-                model:  axisMapModel
+                width:200;
+                model: axisMapModel
                 onSelectedIndexChanged: {
-                    console.debug("onSelectedIndexChanged " + selectedText + ", " + axisMap1UICombo.get(selectedIndex).mapAxis);
-                    js.mapAxis1=caxisMap1UICombo.get(selectedIndex).mapAxis
+                    console.debug("onSelectedIndexChanged " + selectedText + ", " + selectedIndex);
+                    js.mapAxis1=selectedIndex+1;
                 }
-                selectedText:js.mapAxis1
+               selectedIndex:js.mapAxis1-1
              }
 /*            Button{
                 width:200;height:ctrlSize