From 7caf2ee986b2b692642268c25dd8efda1e095238 Mon Sep 17 00:00:00 2001 From: wisplite Date: Fri, 30 Jan 2026 06:18:44 -0600 Subject: [PATCH] cardputer sends ack command when entering and leaving debug mode --- src/debug/SerialDebug.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/debug/SerialDebug.cpp b/src/debug/SerialDebug.cpp index b680aa4..761065f 100644 --- a/src/debug/SerialDebug.cpp +++ b/src/debug/SerialDebug.cpp @@ -16,6 +16,8 @@ State currentState = IDLE; uint8_t rxBuffer[1024]; +uint8_t ack[] = {0xAA, 0x06, 0x00, 0x00, 0x00}; // 0x06 is the universal ACK response + namespace SerialDebug { int handleSerialInput() { @@ -102,14 +104,14 @@ int processPacket(PacketHeader& header, uint8_t* data) { return 0x00; } break; - case 0x04: + case 0x04: // Device wants to initiate dev mode debugMode = true; - Serial.println("DEBUG MODE SET TO TRUE"); + Serial.write(ack, sizeof(ack)); return 0x04; break; - case 0x05: + case 0x05: // Device wants to exit dev mode debugMode = false; - Serial.println("DEBUG MODE SET TO FALSE"); + Serial.write(ack, sizeof(ack)); return 0x05; break; default: