Encoder allowed to fail, preparation for upcoming CAN transmit

This commit is contained in:
Paul Hollinsky
2018-10-18 13:42:20 -04:00
parent 92839c22a5
commit 912b11ce30
4 changed files with 24 additions and 21 deletions
+4 -1
View File
@@ -210,6 +210,9 @@ void Device::updateLEDState() {
* This old command type is not really used anywhere else.
*/
msg->data = {0x00, 0x06, uint8_t(ledState)};
auto packet = com->encoder->encode(msg);
std::vector<uint8_t> packet;
if(!com->encoder->encode(packet, msg))
return;
com->sendPacket(packet);
}