File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -77,13 +77,23 @@ const firmware_flasher = {
7777 detectedSerialDevice : function ( device ) {
7878 console . log ( `${ firmware_flasher . logHead } Detected serial device:` , device ) ;
7979
80- if ( GUI . connect_lock && ! STM32 . rebootMode ) {
80+ // If another operation is in progress, ignore port events.
81+ if ( GUI . connect_lock ) {
8182 console . log (
8283 `${ firmware_flasher . logHead } Serial device event ignored due to active operation (connect_lock)` ,
8384 ) ;
8485 return ;
8586 }
8687
88+ const isFlashOnConnect = $ ( "input.flash_on_connect" ) . is ( ":checked" ) ;
89+
90+ // If flash-on-connect is enabled, trigger startFlashing (if available) instead
91+ // of running AutoDetect.verifyBoard(), mirroring the onPortChange logic.
92+ if ( isFlashOnConnect ) {
93+ firmware_flasher . startFlashing ?. ( ) ;
94+ return ;
95+ }
96+
8797 try {
8898 AutoDetect . verifyBoard ( ) ;
8999 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments