@ -103,6 +103,7 @@ function tab_initialize_initial_setup() {
}
}
$ ( 'span.model' ) . text ( chrome . i18n . getMessage ( 'initialSetupModel' , [ str ] ) ) ;
$ ( 'span.model' ) . text ( chrome . i18n . getMessage ( 'initialSetupModel' , [ str ] ) ) ;
$ ( 'span.heading' ) . text ( chrome . i18n . getMessage ( 'initialSetupheading' , [ 0 ] ) ) ;
// UI Hooks
// UI Hooks
$ ( 'a.calibrateAccel' ) . click ( function ( ) {
$ ( 'a.calibrateAccel' ) . click ( function ( ) {
@ -218,6 +219,8 @@ function tab_initialize_initial_setup() {
// reset yaw button hook
// reset yaw button hook
$ ( 'div#interactive_block > a.reset' ) . click ( function ( ) {
$ ( 'div#interactive_block > a.reset' ) . click ( function ( ) {
yaw _fix = SENSOR _DATA . kinematics [ 2 ] * - 1.0 ;
yaw _fix = SENSOR _DATA . kinematics [ 2 ] * - 1.0 ;
$ ( this ) . text ( chrome . i18n . getMessage ( 'initialSetupButtonResetZaxisValue' , [ yaw _fix ] ) ) ;
console . log ( 'YAW reset to 0 deg, fix: ' + yaw _fix + ' deg' ) ;
console . log ( 'YAW reset to 0 deg, fix: ' + yaw _fix + ' deg' ) ;
} ) ;
} ) ;
@ -247,6 +250,9 @@ function tab_initialize_initial_setup() {
cube . css ( '-webkit-transform' , 'rotateY(' + ( ( SENSOR _DATA . kinematics [ 2 ] * - 1.0 ) - yaw _fix ) + 'deg)' ) ;
cube . css ( '-webkit-transform' , 'rotateY(' + ( ( SENSOR _DATA . kinematics [ 2 ] * - 1.0 ) - yaw _fix ) + 'deg)' ) ;
$ ( '#cubePITCH' , cube ) . css ( '-webkit-transform' , 'rotateX(' + SENSOR _DATA . kinematics [ 1 ] + 'deg)' ) ;
$ ( '#cubePITCH' , cube ) . css ( '-webkit-transform' , 'rotateX(' + SENSOR _DATA . kinematics [ 1 ] + 'deg)' ) ;
$ ( '#cubeROLL' , cube ) . css ( '-webkit-transform' , 'rotateZ(' + SENSOR _DATA . kinematics [ 0 ] + 'deg)' ) ;
$ ( '#cubeROLL' , cube ) . css ( '-webkit-transform' , 'rotateZ(' + SENSOR _DATA . kinematics [ 0 ] + 'deg)' ) ;
// Update heading
$ ( 'span.heading' ) . text ( chrome . i18n . getMessage ( 'initialSetupheading' , [ SENSOR _DATA . kinematics [ 2 ] ] ) ) ;
}
}
GUI . interval _add ( 'initial_setup_data_pull' , get _analog _data , 50 , true ) ;
GUI . interval _add ( 'initial_setup_data_pull' , get _analog _data , 50 , true ) ;