mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
remove shortrt
This commit is contained in:
@@ -268,11 +268,6 @@ static void handle_rtprun(char *arg, RDSModulator* mod, char* output) {
|
|||||||
strcpy(output, "+\0");
|
strcpy(output, "+\0");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_shortrt(char *arg, RDSModulator* mod, char* output) {
|
|
||||||
mod->enc->data[mod->enc->program].shortrt = arg[0];
|
|
||||||
strcpy(output, "+\0");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handle_program(char *arg, RDSModulator* mod, char* output) {
|
static void handle_program(char *arg, RDSModulator* mod, char* output) {
|
||||||
int16_t program = atoi(arg)-1;
|
int16_t program = atoi(arg)-1;
|
||||||
if(program == '\0') {
|
if(program == '\0') {
|
||||||
@@ -584,7 +579,6 @@ static const command_handler_t commands_eq7[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const command_handler_t commands_eq8[] = {
|
static const command_handler_t commands_eq8[] = {
|
||||||
{"SHORTRT", handle_shortrt, 7},
|
|
||||||
{"PROGRAM", handle_program, 7},
|
{"PROGRAM", handle_program, 7},
|
||||||
{"DPS1MOD", handle_dps1mod, 7},
|
{"DPS1MOD", handle_dps1mod, 7},
|
||||||
{"SCRLSPD", handle_scrlspd, 7},
|
{"SCRLSPD", handle_scrlspd, 7},
|
||||||
|
|||||||
10
src/rds.c
10
src/rds.c
@@ -60,8 +60,6 @@ void saveToFile(RDSEncoder *emp, const char *option) {
|
|||||||
tempEncoder.data[emp->program].static_ps_period = emp->data[emp->program].static_ps_period;
|
tempEncoder.data[emp->program].static_ps_period = emp->data[emp->program].static_ps_period;
|
||||||
} else if (strcmp(option, "LPS") == 0) {
|
} else if (strcmp(option, "LPS") == 0) {
|
||||||
memcpy(tempEncoder.data[emp->program].lps, emp->data[emp->program].lps, LPS_LENGTH);
|
memcpy(tempEncoder.data[emp->program].lps, emp->data[emp->program].lps, LPS_LENGTH);
|
||||||
} else if (strcmp(option, "SHORTRT") == 0) {
|
|
||||||
tempEncoder.data[emp->program].shortrt = emp->data[emp->program].shortrt;
|
|
||||||
} else if (strcmp(option, "GRPSEQ") == 0) {
|
} else if (strcmp(option, "GRPSEQ") == 0) {
|
||||||
memcpy(tempEncoder.data[emp->program].grp_sqc, emp->data[emp->program].grp_sqc, sizeof(emp->data[emp->program].grp_sqc));
|
memcpy(tempEncoder.data[emp->program].grp_sqc, emp->data[emp->program].grp_sqc, sizeof(emp->data[emp->program].grp_sqc));
|
||||||
} else if (strcmp(option, "RTP") == 0) {
|
} else if (strcmp(option, "RTP") == 0) {
|
||||||
@@ -816,11 +814,11 @@ void set_rds_rt1(RDSEncoder* enc, char *rt1) {
|
|||||||
memset(enc->data[enc->program].rt1, ' ', RT_LENGTH);
|
memset(enc->data[enc->program].rt1, ' ', RT_LENGTH);
|
||||||
while (*rt1 != 0 && len < RT_LENGTH) enc->data[enc->program].rt1[len++] = *rt1++;
|
while (*rt1 != 0 && len < RT_LENGTH) enc->data[enc->program].rt1[len++] = *rt1++;
|
||||||
|
|
||||||
while (len > 0 && enc->data[enc->program].rt1[len - 1] == ' ' && enc->data[enc->program].shortrt) {
|
while (len > 0 && enc->data[enc->program].rt1[len - 1] == ' ') {
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len < RT_LENGTH && enc->data[enc->program].shortrt) {
|
if (len < RT_LENGTH) {
|
||||||
enc->state[enc->program].rt_segments = 0;
|
enc->state[enc->program].rt_segments = 0;
|
||||||
|
|
||||||
enc->data[enc->program].rt1[len++] = '\r';
|
enc->data[enc->program].rt1[len++] = '\r';
|
||||||
@@ -842,11 +840,11 @@ void set_rds_rt2(RDSEncoder* enc, char *rt2) {
|
|||||||
memset(enc->data[enc->program].rt2, ' ', RT_LENGTH);
|
memset(enc->data[enc->program].rt2, ' ', RT_LENGTH);
|
||||||
while (*rt2 != 0 && len < RT_LENGTH) enc->data[enc->program].rt2[len++] = *rt2++;
|
while (*rt2 != 0 && len < RT_LENGTH) enc->data[enc->program].rt2[len++] = *rt2++;
|
||||||
|
|
||||||
while (len > 0 && enc->data[enc->program].rt2[len - 1] == ' ' && enc->data[enc->program].shortrt) {
|
while (len > 0 && enc->data[enc->program].rt2[len - 1] == ' ') {
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len < RT_LENGTH && enc->data[enc->program].shortrt) {
|
if (len < RT_LENGTH) {
|
||||||
enc->state[enc->program].rt2_segments = 0;
|
enc->state[enc->program].rt2_segments = 0;
|
||||||
|
|
||||||
enc->data[enc->program].rt2[len++] = '\r';
|
enc->data[enc->program].rt2[len++] = '\r';
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ typedef struct {
|
|||||||
uint8_t dps_speed : 1;
|
uint8_t dps_speed : 1;
|
||||||
uint8_t static_ps_period;
|
uint8_t static_ps_period;
|
||||||
|
|
||||||
uint8_t shortrt : 1;
|
|
||||||
uint8_t rt1_enabled : 1;
|
uint8_t rt1_enabled : 1;
|
||||||
uint8_t rt2_enabled : 1;
|
uint8_t rt2_enabled : 1;
|
||||||
uint8_t rt_type : 2;
|
uint8_t rt_type : 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user