1111 pitch : 1 ,
1212 yaw : 3 ,
1313 throttle : 2 ,
14- aux1 : 4 ,
15- aux2 : 5 ,
16- aux3 : 6 ,
17- aux4 : 7
14+ ch5 : 4 ,
15+ ch6 : 5 ,
16+ ch7 : 6 ,
17+ ch8 : 7 ,
18+ ch9 : 8 ,
19+ ch10 : 9 ,
20+ ch11 : 10 ,
21+ ch12 : 11 ,
1822 } ,
1923
2024 // Set reasonable initial stick positions (Mode 2)
2327 pitch : CHANNEL_MID_VALUE ,
2428 roll : CHANNEL_MID_VALUE ,
2529 yaw : CHANNEL_MID_VALUE ,
26- aux1 : CHANNEL_MIN_VALUE ,
27- aux2 : CHANNEL_MIN_VALUE ,
28- aux3 : CHANNEL_MIN_VALUE ,
29- aux4 : CHANNEL_MIN_VALUE
30+ ch5 : CHANNEL_MIN_VALUE ,
31+ ch6 : CHANNEL_MIN_VALUE ,
32+ ch7 : CHANNEL_MIN_VALUE ,
33+ ch8 : CHANNEL_MIN_VALUE ,
34+ ch9 : CHANNEL_MIN_VALUE ,
35+ ch10 : CHANNEL_MIN_VALUE ,
36+ ch11 : CHANNEL_MIN_VALUE ,
37+ ch12 : CHANNEL_MIN_VALUE ,
3038 } ,
3139
3240 // First the vertical axis, then the horizontal:
4250
4351function transmitChannels ( ) {
4452 var
45- channelValues = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ;
53+ channelValues = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ;
4654
4755 if ( ! enableTX ) {
4856 return ;
@@ -114,7 +122,7 @@ function localizeAxisNames() {
114122 $ ( ".gimbal-label-horz" , gimbal ) . text ( chrome . i18n . getMessage ( "controlAxis" + gimbals [ gimbalIndex ] [ 1 ] ) ) ;
115123 }
116124
117- for ( var sliderIndex = 0 ; sliderIndex < 4 ; sliderIndex ++ ) {
125+ for ( var sliderIndex = 0 ; sliderIndex < 8 ; sliderIndex ++ ) {
118126 $ ( ".slider-label" , sliderElems . get ( sliderIndex ) ) . text ( chrome . i18n . getMessage ( "radioChannelShort" ) + ( sliderIndex + 5 ) ) ;
119127 }
120128}
@@ -148,7 +156,7 @@ $(document).ready(function() {
148156
149157 $ ( ".slider" , sliderElems ) . each ( function ( sliderIndex ) {
150158 var
151- initialValue = stickValues [ "aux " + ( sliderIndex + 1 ) ] ;
159+ initialValue = stickValues [ "ch " + ( sliderIndex + 5 ) ] ;
152160
153161 $ ( this )
154162 . noUiSlider ( {
@@ -160,7 +168,7 @@ $(document).ready(function() {
160168 } ) . on ( 'slide change set' , function ( e , value ) {
161169 value = Math . round ( parseFloat ( value ) ) ;
162170
163- stickValues [ "aux " + ( sliderIndex + 1 ) ] = value ;
171+ stickValues [ "ch " + ( sliderIndex + 5 ) ] = value ;
164172
165173 $ ( ".tooltip" , this ) . text ( value ) ;
166174 } ) ;
0 commit comments