From 09d2d5f6c58434f4463236b4595189903e115bd9 Mon Sep 17 00:00:00 2001 From: "David E. Tiller" <3858971+dtiller@users.noreply.github.com> Date: Tue, 5 Apr 2022 14:30:16 -0400 Subject: [PATCH] Added ARM logic. --- src/eotd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/eotd.c b/src/eotd.c index acf2238..c86d8c8 100644 --- a/src/eotd.c +++ b/src/eotd.c @@ -108,8 +108,8 @@ void get_r2f_msg_id_type(uint64_t pkt, char *text, int text_size) { uint32_t val; char temp[32]; - pkt >>= 4; - val = pkt & 0x07ULL; + uint64_t temp_pkt = pkt >> 4; + val = temp_pkt & 0x07ULL; strlcat(text, "msgid=", text_size); @@ -118,6 +118,14 @@ void get_r2f_msg_id_type(uint64_t pkt, char *text, int text_size) { strlcat(text, "ONEWAY", text_size); break; + case 7: // TEST button, maybe + // Test the CONFIRM bit + if ((pkt & 0x10000000000ULL) == 0) { + strlcat(text, "TEST/ARM_REQ", text_size); + } else { + strlcat(text, "ARM_CONFIRM", text_size); + } + break; default: sprintf(temp, "CUSTOM(%d)", val); strlcat(text, temp, text_size);