0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 12:32:05 +01:00

attempt to fix lps

This commit is contained in:
2025-04-14 18:15:26 +02:00
parent 6b7655b890
commit 3a05e39bb6
4 changed files with 11 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
{
"port": 13452,
"time": 1744548934182,
"time": 1744647168046,
"version": "0.0.3"
}

View File

@@ -100,16 +100,13 @@ Sets the LPS: `LPS=NovaFM❤`
### ERT
TODO: ERT
Sets the ERT: `ERT=Currently on air we're playing: Lady Gaga - Applause`
*Note that ERT is a 128-character version of RT with UTF-8 support*
### PTYN
Sets the programme type name: `PTYN=Football`
### AFCH
TODO: AFCH
### UDG1
Sets the user defined group, max 8 groups: `UDG1=6000FFFFFFFF`

View File

@@ -13,25 +13,25 @@ typedef struct {
} pattern_command_handler_t;
static void handle_ptyn(char *arg, RDSModulator* mod, char* output) {
arg[PTYN_LENGTH+1] = 0;
arg[PTYN_LENGTH+8] = 0;
set_rds_ptyn(mod->enc, convert_to_rdscharset(arg));
strcpy(output, "+\0");
}
static void handle_tps(char *arg, RDSModulator* mod, char* output) {
arg[PS_LENGTH+1] = 0;
arg[PS_LENGTH+8] = 0;
set_rds_tps(mod->enc, convert_to_rdscharset(arg));
strcpy(output, "+\0");
}
static void handle_rt1(char *arg, RDSModulator* mod, char* output) {
arg[RT_LENGTH+1] = 0;
arg[RT_LENGTH+8] = 0;
set_rds_rt1(mod->enc, convert_to_rdscharset(arg));
strcpy(output, "+\0");
}
static void handle_rt2(char *arg, RDSModulator* mod, char* output) {
arg[RT_LENGTH+1] = 0;
arg[RT_LENGTH+8] = 0;
set_rds_rt2(mod->enc, convert_to_rdscharset(arg));
strcpy(output, "+\0");
}
@@ -75,19 +75,19 @@ static void handle_link(char *arg, RDSModulator* mod, char* output) {
}
static void handle_lps(char *arg, RDSModulator* mod, char* output) {
arg[LPS_LENGTH+1] = 0;
arg[LPS_LENGTH+8] = 0;
set_rds_lps(mod->enc, arg);
strcpy(output, "+\0");
}
static void handle_ert(char *arg, RDSModulator* mod, char* output) {
arg[ERT_LENGTH+1] = 0;
arg[ERT_LENGTH+8] = 0;
set_rds_ert(mod->enc, arg);
strcpy(output, "+\0");
}
static void handle_ps(char *arg, RDSModulator* mod, char* output) {
arg[PS_LENGTH+1] = 0;
arg[PS_LENGTH+8] = 0;
set_rds_ps(mod->enc, convert_to_rdscharset(arg));
strcpy(output, "+\0");
}

View File

@@ -884,6 +884,7 @@ void set_rds_lps(RDSEncoder* enc, char *lps) {
if (len < LPS_LENGTH) {
enc->state[enc->program].lps_segments = 0;
enc->data[enc->program].lps[len++] = '\r';
while (i < len) {
i += 4;
enc->state[enc->program].lps_segments++;