mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Decoder: Pass on short Device messages
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user