File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1+ let servoCalibrationDialogOpen = false ;
2+
13// Calibration Wizard
24function penUpSend ( data ) {
5+ if ( ! servoCalibrationDialogOpen ) return ; // Prevent sending commands if modal is closed
36 console . log ( "Move to " + data )
47 sendGcode ( "M3 S" + data ) ;
58}
69
710function penDownSend ( data ) {
11+ if ( ! servoCalibrationDialogOpen ) return ; // Prevent sending commands if modal is closed
812 console . log ( "Move to " + data )
913 sendGcode ( "M3 S" + data ) ;
1014}
1115
12-
13-
14-
15-
1616function servocalibrate ( ) {
1717
1818 var servoMaxScale = parseInt ( grblParams . $30 ) ;
1919
20-
2120 var servocaltemplate = `
2221
2322 <div id="servocalstep1">
@@ -112,10 +111,15 @@ function servocalibrate() {
112111 cls : "js-dialog-close" ,
113112 onclick : function ( ) {
114113 //
114+ servoCalibrationDialogOpen = false ; // Dialog is closed
115115 }
116116 } ] ,
117117 defaultAction : false
118118 } ) ;
119+
120+ servoCalibrationDialogOpen = true ; // Dialog is now open
121+
122+
119123 setTimeout ( function ( ) {
120124 $ ( '#penupslider' ) . data ( 'slider' ) . val ( servoMaxScale / 2 )
121125 } , 100 ) ;
@@ -159,6 +163,6 @@ function closeServoCal() {
159163 localStorage . setItem ( "servo-calibration" , JSON . stringify ( servo ) ) ;
160164 Metro . dialog . close ( $ ( '#servocalstep1' ) . parent ( ) . parent ( ) ) ;
161165 console . log ( servo )
162-
166+ servoCalibrationDialogOpen = false ; // Dialog is closed
163167 askToResetOnGrblSettingsChange ( ) ;
164168}
Original file line number Diff line number Diff line change 11{
22 "name" : " OpenBuildsCONTROL" ,
3- "version" : " 1.0.383 " ,
3+ "version" : " 1.0.384 " ,
44 "license" : " AGPL-3.0" ,
55 "description" : " OpenBuildsCONTROL CNC Machine Host Software" ,
66 "author" : " github.com/openbuilds <support@openbuilds.com>" ,
You can’t perform that action at this time.
0 commit comments