From 3df46e643901039fa72f54b2418343b35ea759b0 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Fri, 14 Mar 2025 16:45:37 +0100 Subject: [PATCH] forgot about that --- src/ascii_cmd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ascii_cmd.c b/src/ascii_cmd.c index 4b8eecb..2eeac2d 100644 --- a/src/ascii_cmd.c +++ b/src/ascii_cmd.c @@ -208,8 +208,22 @@ static void handle_eccen(unsigned char *arg) { } static void handle_grpseq(unsigned char *arg) { + unsigned char grps[24]; + int count = 0; + while (*arg && count < 24) { + unsigned int value; + if (sscanf((char *)arg, "%1X", &value) == 1) { + grps[count++] = (unsigned char)value; + arg++; // Move to the next character + } else { + break; // Stop if input is invalid + } + } + + set_rds_grpseq(grps); } + // Command tables organized by delimiter position and command length static const command_handler_t commands_eq3[] = { {"PS", handle_ps, 2},