diff --git a/src/sscma/grove_ai_we2/deviceHimax.ts b/src/sscma/grove_ai_we2/deviceHimax.ts index 380b2cd..2d16095 100644 --- a/src/sscma/grove_ai_we2/deviceHimax.ts +++ b/src/sscma/grove_ai_we2/deviceHimax.ts @@ -260,6 +260,7 @@ class Himax extends Device { public async disconnect(): Promise { console.log('Called when disconnected, Does serial exist?', !!this.serial); + this.break(); this.cleanLogger(); if (!this.serial) { return; diff --git a/src/sscma/xiao_esp32s3/EspSerialDevice.ts b/src/sscma/xiao_esp32s3/EspSerialDevice.ts index e3d07ac..55fd364 100644 --- a/src/sscma/xiao_esp32s3/EspSerialDevice.ts +++ b/src/sscma/xiao_esp32s3/EspSerialDevice.ts @@ -126,6 +126,7 @@ class EspSerialDevice extends Device { public async disconnect() { this.cleanLogger(); try { + this.break(); this.reader?.releaseLock(); this.writer?.releaseLock(); await this.port?.close();