From 95ede98623a657940054fd10c4a0e39a7fb95354 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 17 Jun 2023 13:08:00 -0400 Subject: [PATCH] State string should start and end with the character --- ino/mcopy_cam_relay/mcopy_cam_relay.ino | 5 +++-- src/arduino/index.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ino/mcopy_cam_relay/mcopy_cam_relay.ino b/ino/mcopy_cam_relay/mcopy_cam_relay.ino index 62857ef..d717391 100644 --- a/ino/mcopy_cam_relay/mcopy_cam_relay.ino +++ b/ino/mcopy_cam_relay/mcopy_cam_relay.ino @@ -95,8 +95,9 @@ void camera () { } void state () { - String stateString = String(mc.CAMERA_EXPOSURE); + String stateString = String(mc.STATE); + stateString += String(mc.CAMERA_EXPOSURE); stateString += String(cameraFrame); stateString += String(mc.STATE); - mc.print(stateString); + mc.sendString(stateString); } diff --git a/src/arduino/index.ts b/src/arduino/index.ts index 41b86c6..4146821 100644 --- a/src/arduino/index.ts +++ b/src/arduino/index.ts @@ -224,7 +224,7 @@ class Arduino { const end : number = new Date().getTime() const ms : number = end - this.timer let complete : any - //this.log.info(`${serial} -> ${data}`); + //this.log.info(`${serial} -> ${data}`) if (this.queue[data] !== undefined) { this.locks[serial] = false complete = this.queue[data](ms) //execute callback