File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,25 @@ TABS.magnetometer.initialize = function (callback) {
5858 // Pitch and roll must be inverted
5959 function ( callback ) {
6060 mspHelper . getSetting ( "align_mag_roll" ) . then ( function ( data ) {
61+ if ( data == null ) {
62+ console . log ( "while settting align_mag_roll, data is null or undefined" ) ;
63+ }
6164 self . alignmentConfig . roll = parseInt ( data . value , 10 ) / 10 ;
6265 } ) . then ( callback )
6366 } ,
6467 function ( callback ) {
6568 mspHelper . getSetting ( "align_mag_pitch" ) . then ( function ( data ) {
69+ if ( data == null ) {
70+ console . log ( "while settting align_mag_pitch, data is null or undefined" ) ;
71+ }
6672 self . alignmentConfig . pitch = parseInt ( data . value , 10 ) / 10 ;
6773 } ) . then ( callback )
6874 } ,
6975 function ( callback ) {
7076 mspHelper . getSetting ( "align_mag_yaw" ) . then ( function ( data ) {
77+ if ( data == null ) {
78+ console . log ( "while settting align_mag_yaw, data is null or undefined" ) ;
79+ }
7180 self . alignmentConfig . yaw = parseInt ( data . value , 10 ) / 10 ;
7281 } ) . then ( callback )
7382 }
@@ -242,6 +251,10 @@ TABS.magnetometer.initialize = function (callback) {
242251 }
243252
244253 function updateBoardRollAxis ( value ) {
254+ if ( value == null ) {
255+ console . log ( "in updateBoardRollAxis, value is null or undefined" ) ;
256+ }
257+
245258 self . boardAlignmentConfig . roll = Number ( value ) ;
246259 self . pageElements . board_roll_slider . val ( self . boardAlignmentConfig . roll ) ;
247260 self . pageElements . orientation_board_roll . val ( self . boardAlignmentConfig . roll ) ;
You can’t perform that action at this time.
0 commit comments