mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
add a new rds2 mode
This commit is contained in:
@@ -243,6 +243,11 @@ static void handle_program(char *arg, RDSModulator* mod, char* output) {
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
static void handle_rds2mod(char *arg, RDSModulator* mod, char* output) {
|
||||
mod->enc->encoder_data.rds2_mode = atoi(arg);
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
static void handle_grpseq(char *arg, RDSModulator* mod, char* output) {
|
||||
if (arg[0] == '\0') {
|
||||
set_rds_grpseq(mod->enc, DEFAULT_GRPSQC);
|
||||
@@ -251,6 +256,14 @@ static void handle_grpseq(char *arg, RDSModulator* mod, char* output) {
|
||||
}
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
static void handle_grpseq2(char *arg, RDSModulator* mod, char* output) {
|
||||
if (arg[0] == '\0') {
|
||||
set_rds_grpseq2(mod->enc, "\0");
|
||||
} else {
|
||||
set_rds_grpseq2(mod->enc, arg);
|
||||
}
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
static void handle_level(char *arg, RDSModulator* mod, char* output) {
|
||||
mod->params.level = atoi(arg)/255.0f;
|
||||
@@ -536,6 +549,8 @@ static const command_handler_t commands_eq7[] = {
|
||||
|
||||
static const command_handler_t commands_eq8[] = {
|
||||
{"PROGRAM", handle_program, 7},
|
||||
{"RDS2MOD", handle_rds2mod, 7},
|
||||
{"GRPSEQ2", handle_grpseq2, 7},
|
||||
};
|
||||
static const command_handler_t commands_exact[] = {
|
||||
{"INIT", handle_init, 4},
|
||||
|
||||
Reference in New Issue
Block a user