better flow + handle unclosed connection (#921)
* better flow + handle unclosed connection * more checks
This commit is contained in:
@ -80,7 +80,6 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
className: "bluetooth focused",
|
||||
onclick: () => {
|
||||
pxt.tickEvent("bluetooth.enable");
|
||||
enableWebSerial();
|
||||
confirmAsync({
|
||||
header: lf("Bluetooth enabled"),
|
||||
hasCloseIcon: true,
|
||||
@ -93,7 +92,7 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
}],
|
||||
htmlBody: `
|
||||
<p>
|
||||
${lf("Please download again to send your code to the EV3 over Bluetooth.")}
|
||||
${lf("Download again to send your code to the EV3 over Bluetooth. Make sure to stop your program!")}
|
||||
</p>
|
||||
<p>
|
||||
${lf("You will be prompted to select a serial port.")}
|
||||
@ -101,6 +100,8 @@ ${lf("On Windows, look for 'Standard Serial over Bluetooth link'.")}
|
||||
${lf("If you have paired multiple EV3, you might have to try out multiple ports until you find the correct one.")}
|
||||
</p>
|
||||
`
|
||||
}).then(() => {
|
||||
enableWebSerial();
|
||||
})
|
||||
}
|
||||
} : undefined, downloadAgain ? {
|
||||
|
Reference in New Issue
Block a user