Decoder: Pass on short Device messages
parent
0ce52f064b
commit
3d4e0a27e3
|
|
@ -123,8 +123,10 @@ bool Decoder::decode(std::shared_ptr<Message>& result, const std::shared_ptr<Pac
|
||||||
// They come in as CAN but we will handle them in the device rather than
|
// They come in as CAN but we will handle them in the device rather than
|
||||||
// passing them onto the user.
|
// passing them onto the user.
|
||||||
if(packet->data.size() < 24) {
|
if(packet->data.size() < 24) {
|
||||||
report(APIEvent::Type::PacketDecodingError, APIEvent::Severity::Error);
|
result = std::make_shared<Message>();
|
||||||
return false;
|
result->network = packet->network;
|
||||||
|
result->data = packet->data;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = HardwareCANPacket::DecodeToMessage(packet->data);
|
result = HardwareCANPacket::DecodeToMessage(packet->data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue