File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { WebWorkflow } from "../backends/web.js"
1010import { USBWorkflow } from "../backends/usb.js"
1111import { BLEWorkflow } from "../backends/ble.js"
1212
13+ const WEB_WORKFLOW_ENABLED = true
1314const BOARD_PAGE = "html/board-template.html"
1415var update_timer = null
1516var update_timer_running = false
@@ -137,7 +138,7 @@ async function giveup_web(e) {
137138
138139async function detect_web ( ) {
139140 // Web workflow
140- if ( true ) {
141+ if ( WEB_WORKFLOW_ENABLED ) {
141142 // $(".web_workflow").show()
142143 const devices = await WebWorkflow . find_devices ( )
143144 // candidates
@@ -157,10 +158,14 @@ async function detect_web() {
157158 var wf = new WebWorkflow ( board_link )
158159 var did_start = await wf . start ( )
159160 if ( ! did_start ) {
160- console . log ( "SKIP" )
161+ console . log ( "SKIP: no start " )
161162 continue
162163 }
163164 const info = await wf . device_info ( )
165+ if ( $ . isEmptyObject ( info ) ) {
166+ console . log ( "SKIP: device info not available" )
167+ continue
168+ }
164169 var board_identifier = ( await wf . get_identifier ( ) ) . replace ( / \. l o c a l $ / , "" )
165170 if ( ! board_identifier ) board_identifier = board_path
166171 const serial = info [ "serial_num" ] || board_identifier
You can’t perform that action at this time.
0 commit comments