This commit is contained in:
Irene-Maxine
2025-05-29 22:59:16 +08:00
4 changed files with 16 additions and 4 deletions

View File

@@ -25,4 +25,10 @@ class GC032A(Camera):
def deinit(self):
super().deinit()
onboard_bot.cam_en(0,100)
onboard_bot.cam_en(0, 100)
def display(self, show=True):
if show:
super().display()
else:
super().display_stop()

View File

@@ -285,8 +285,10 @@ BU.burnWithEsptool = async (binFile, erase) => {
} catch (error) {
Debug.error(error);
statusBarTerminal.addValue(`\n${error.toString()}\n`);
if (port.connected) {
try {
await transport.disconnect();
} catch (error) {
Debug.error(error);
}
BU.progressLayer.hide();
return;
@@ -309,8 +311,10 @@ BU.burnWithEsptool = async (binFile, erase) => {
} catch (error) {
statusBarTerminal.addValue("Failed!\n" + Msg.Lang['shell.bin.readFailed'] + "\n");
statusBarTerminal.addValue("\n" + e + "\n", true);
if (port.connected) {
try {
await transport.disconnect();
} catch (error) {
Debug.error(error);
}
BU.progressLayer.hide();
return;
@@ -338,8 +342,10 @@ BU.burnWithEsptool = async (binFile, erase) => {
BU.progressLayer.hide();
statusBarTerminal.addValue(`==${Msg.Lang['shell.burnFailed']}==\n`);
} finally {
if (port.connected) {
try {
await transport.disconnect();
} catch (error) {
Debug.error(error);
}
}
}