From 3285773212a70223ef59ad25897182468277e597 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 3 Nov 2020 10:30:53 +0100 Subject: [PATCH] first use of libmbus --- cube/User/Src/mbusComm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cube/User/Src/mbusComm.c b/cube/User/Src/mbusComm.c index 1bd0cda..9056538 100644 --- a/cube/User/Src/mbusComm.c +++ b/cube/User/Src/mbusComm.c @@ -55,8 +55,8 @@ static t_mbusCommHandle mbusCommHandle = { .state = MBCS_IDLE, .retryCnt = 0, .c static void parseAndPrintFrame(t_longframe *frame) { mbus_frame reply; - memset(&reply, 0, sizeof(reply)); + //mbus_parse(&reply, buf, len); reply.start1 = frame->start1; reply.length1 = frame->length1; @@ -74,10 +74,11 @@ static void parseAndPrintFrame(t_longframe *frame) { int r = mbus_frame_verify(&reply); logMsg("papf verify: %d", r); + mbus_frame_data frame_data; + memset(&frame_data, 0, sizeof(frame_data)); - // memset(&frame_data, 0, sizeof(frame_data)); - // mbus_frame_data_parse(&reply, &frame_data); - // mbus_frame_print(&reply); + mbus_frame_data_parse(&reply, &frame_data); + mbus_frame_print(&reply); }