From e534958300ddaa71a0d6584ac294d56d9bba8e92 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sat, 29 Jan 2022 18:26:24 +0100 Subject: [PATCH] Respond to key transmission --- Sesame-Device.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sesame-Device.ino b/Sesame-Device.ino index 1da37cc..331f8dd 100644 --- a/Sesame-Device.ino +++ b/Sesame-Device.ino @@ -208,6 +208,7 @@ SesameEvent handleReceivedRequest(const uint8_t* payload, size_t length) { if (length != KEY_BYTE_COUNT + 2) { return SesameEvent::InvalidPayloadSize; } + Serial.println("Key received"); uint16_t keyIndex = ((uint16_t) payload[0] << 8) + payload[1]; if (keyIndex >= KEY_COUNT) { return SesameEvent::InvalidKeyIndex; @@ -268,7 +269,7 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) { sendResponse(SesameEvent::TextReceived); break; case WStype_BIN: - handleReceivedRequest(payload, length); + processReceivedBytes(payload, length); break; case WStype_ERROR: case WStype_FRAGMENT_TEXT_START: