From 25e7b2dfb80b569a0a143b10841aada073812ca9 Mon Sep 17 00:00:00 2001 From: gabryelreyes Date: Wed, 22 Nov 2023 11:03:30 +0100 Subject: [PATCH] Fixed initialization of payload --- src/SerialMuxProtCommon.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SerialMuxProtCommon.hpp b/src/SerialMuxProtCommon.hpp index ef5d1c2..6baf3f4 100644 --- a/src/SerialMuxProtCommon.hpp +++ b/src/SerialMuxProtCommon.hpp @@ -172,11 +172,11 @@ enum COMMANDS : uint8_t */ typedef struct _ControlChannelPayload { - uint8_t commandByte; /**< Command Byte */ - uint32_t timestamp; /**< Timestamp */ - uint8_t channelNumber; /**< Channel Number */ - char channelName[CHANNEL_NAME_MAX_LEN]; /**< Channel Name */ -} __attribute__((packed)) ControlChannelPayload; /**< ControlChannelPayload */ + uint8_t commandByte = 0U; /**< Command Byte */ + uint32_t timestamp = 0U; /**< Timestamp */ + uint8_t channelNumber = 0U; /**< Channel Number */ + char channelName[CHANNEL_NAME_MAX_LEN] = {0U}; /**< Channel Name */ +} __attribute__((packed)) ControlChannelPayload; /**< ControlChannelPayload */ #endif /* SERIALMUXPROT_COMMON_H_ */ /** @} */