@ -257,8 +257,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$ ( '#content' ) . scrollTop ( ( scrollPosition ) ? scrollPosition : 0 ) ;
$ ( '#content' ) . scrollTop ( ( scrollPosition ) ? scrollPosition : 0 ) ;
// fill board alignment
// fill board alignment
$ ( 'input[name="board_align_roll"]' ) . val ( ( BF _CONFIG . board _align _roll / 10.0 ) . toFixed ( 1 ) ) ;
$ ( 'input[name="board_align_pitch"]' ) . val ( ( BF _CONFIG . board _align _pitch / 10.0 ) . toFixed ( 1 ) ) ;
$ ( 'input[name="board_align_yaw"]' ) . val ( ( BF _CONFIG . board _align _yaw / 10.0 ) . toFixed ( 1 ) ) ;
$ ( 'input[name="board_align_yaw"]' ) . val ( ( BF _CONFIG . board _align _yaw / 10.0 ) . toFixed ( 1 ) ) ;
// fill magnetometer
// fill magnetometer
@ -316,12 +314,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$i2cSpeed . change ( ) ;
$i2cSpeed . change ( ) ;
var $looptime = $ ( "#looptime" ) ;
let $looptime = $ ( "#looptime" ) ,
$gyroLpf = $ ( "#gyro-lpf" ) ,
var $gyroLpf = $ ( "#gyro-lpf" ) ,
values = FC . getGyroLpfValues ( ) ;
$gyroLpfMessage = $ ( '#gyrolpf-info' ) ;
var values = FC . getGyroLpfValues ( ) ;
for ( i in values ) {
for ( i in values ) {
if ( values . hasOwnProperty ( i ) ) {
if ( values . hasOwnProperty ( i ) ) {
@ -343,43 +338,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
) ;
) ;
$looptime . val ( FC . getLooptimes ( ) [ FC . getGyroLpfValues ( ) [ INAV _PID _CONFIG . gyroscopeLpf ] . tick ] . defaultLooptime ) ;
$looptime . val ( FC . getLooptimes ( ) [ FC . getGyroLpfValues ( ) [ INAV _PID _CONFIG . gyroscopeLpf ] . tick ] . defaultLooptime ) ;
$looptime . change ( ) ;
$looptime . change ( ) ;
$gyroLpfMessage . hide ( ) ;
$gyroLpfMessage . removeClass ( 'ok-box' ) ;
$gyroLpfMessage . removeClass ( 'info-box' ) ;
$gyroLpfMessage . removeClass ( 'warning-box' ) ;
if ( MIXER _CONFIG . platformType == PLATFORM _MULTIROTOR || MIXER _CONFIG . platformType == PLATFORM _TRICOPTER ) {
switch ( parseInt ( INAV _PID _CONFIG . gyroscopeLpf , 10 ) ) {
case 0 :
$gyroLpfMessage . html ( chrome . i18n . getMessage ( 'gyroLpfSuggestedMessage' ) ) ;
$gyroLpfMessage . addClass ( 'ok-box' ) ;
$gyroLpfMessage . show ( ) ;
break ;
case 1 :
$gyroLpfMessage . html ( chrome . i18n . getMessage ( 'gyroLpfWhyNotHigherMessage' ) ) ;
$gyroLpfMessage . addClass ( 'info-box' ) ;
$gyroLpfMessage . show ( ) ;
break ;
case 2 :
$gyroLpfMessage . html ( chrome . i18n . getMessage ( 'gyroLpfWhyNotSlightlyHigherMessage' ) ) ;
$gyroLpfMessage . addClass ( 'info-box' ) ;
$gyroLpfMessage . show ( ) ;
break
case 3 :
$gyroLpfMessage . html ( chrome . i18n . getMessage ( 'gyroLpfNotAdvisedMessage' ) ) ;
$gyroLpfMessage . addClass ( 'info-box' ) ;
$gyroLpfMessage . show ( ) ;
break ;
case 4 :
case 5 :
$gyroLpfMessage . html ( chrome . i18n . getMessage ( 'gyroLpfNotFlyableMessage' ) ) ;
$gyroLpfMessage . addClass ( 'warning-box' ) ;
$gyroLpfMessage . show ( ) ;
break ;
}
}
} ) ;
} ) ;
$gyroLpf . change ( ) ;
$gyroLpf . change ( ) ;
@ -393,11 +351,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} else {
} else {
$ ( '#looptime-warning' ) . hide ( ) ;
$ ( '#looptime-warning' ) . hide ( ) ;
}
}
if ( INAV _PID _CONFIG . asynchronousMode == 0 ) {
//All task running together
ADVANCED _CONFIG . gyroSyncDenominator = Math . floor ( FC _CONFIG . loopTime / FC . getGyroLpfValues ( ) [ INAV _PID _CONFIG . gyroscopeLpf ] . tick ) ;
}
} ) ;
} ) ;
$looptime . change ( ) ;
$looptime . change ( ) ;
@ -512,8 +465,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
helper . features . reset ( ) ;
helper . features . reset ( ) ;
helper . features . fromUI ( $ ( '.tab-configuration' ) ) ;
helper . features . fromUI ( $ ( '.tab-configuration' ) ) ;
helper . features . execute ( function ( ) {
helper . features . execute ( function ( ) {
BF _CONFIG . board _align _roll = Math . round ( parseFloat ( $ ( 'input[name="board_align_roll"]' ) . val ( ) ) * 10 ) ;
BF _CONFIG . board _align _pitch = Math . round ( parseFloat ( $ ( 'input[name="board_align_pitch"]' ) . val ( ) ) * 10 ) ;
BF _CONFIG . board _align _yaw = Math . round ( parseFloat ( $ ( 'input[name="board_align_yaw"]' ) . val ( ) ) * 10 ) ;
BF _CONFIG . board _align _yaw = Math . round ( parseFloat ( $ ( 'input[name="board_align_yaw"]' ) . val ( ) ) * 10 ) ;
BF _CONFIG . currentscale = parseInt ( $ ( '#currentscale' ) . val ( ) ) ;
BF _CONFIG . currentscale = parseInt ( $ ( '#currentscale' ) . val ( ) ) ;
BF _CONFIG . currentoffset = Math . round ( parseFloat ( $ ( '#currentoffset' ) . val ( ) ) * 10 ) ;
BF _CONFIG . currentoffset = Math . round ( parseFloat ( $ ( '#currentoffset' ) . val ( ) ) * 10 ) ;