From ff1a78c4eb1d73dfea0af484c1ccd33a439881ea Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Wed, 4 Sep 2019 13:31:17 -0400 Subject: [PATCH] Hotfix for broken device LED updating This is fixed more permanently on the development branch. That change will be preferred over this one, when the time comes to merge. --- device/device.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/device/device.cpp b/device/device.cpp index 0d121a8..81da863 100644 --- a/device/device.cpp +++ b/device/device.cpp @@ -267,5 +267,10 @@ void Device::updateLEDState() { auto msg = std::make_shared(); msg->network = Network::NetID::Device; msg->data = {0x00, 0x06, uint8_t(ledState)}; - transmit(msg); + + std::vector packet; + if(!com->encoder->encode(packet, msg)) + return; + + com->sendPacket(packet); } \ No newline at end of file