mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-07-29 16:29:17 +02:00
more stuff
This commit is contained in:
@@ -199,12 +199,6 @@ static void handle_ertprun(char *arg, RDSModulator* mod, char* output) {
|
||||
strcpy(output, "+");
|
||||
}
|
||||
|
||||
static void handle_grpseq(char *arg, RDSModulator* mod, char* output) {
|
||||
if (arg[0] == 0) set_rds_grpseq(mod->enc, DEFAULT_GRPSQC);
|
||||
else set_rds_grpseq(mod->enc, arg);
|
||||
strcpy(output, "+");
|
||||
}
|
||||
|
||||
static void handle_eonen(char *arg, char *pattern, RDSModulator* mod, char* output) {
|
||||
mod->enc->data[mod->enc->program].eon[atoi(pattern)-1].enabled = atoi(arg);
|
||||
strcpy(output, "+");
|
||||
@@ -307,7 +301,6 @@ static const command_handler_t commands_eq2[] = {
|
||||
|
||||
static const command_handler_t commands_eq7[] = {
|
||||
{"RTPRUN", handle_rtprun, 6},
|
||||
{"GRPSEQ", handle_grpseq, 6},
|
||||
};
|
||||
|
||||
static const command_handler_t commands_eq8[] = {
|
||||
|
||||
@@ -10,6 +10,15 @@ if type(data) == "string" then
|
||||
elseif data == "reset" then
|
||||
reset_rds()
|
||||
return "+"
|
||||
elseif data == "pi" then return string.format("PI=%s\r\n", string.format("%x", get_rds_pi()))
|
||||
elseif data == "pty" then return string.format("PTY=%s\r\n", string.format("%d", get_rds_pty()))
|
||||
elseif data == "ecc" then return string.format("ECC=%s\r\n", string.format("%x", get_rds_ecc()))
|
||||
elseif data == "slcd" then return string.format("SLCD=%s\r\n", string.format("%x", get_rds_slc_data()))
|
||||
elseif data == "ct" then return string.format("CT=%s\r\n", string.format("%d", get_rds_ct()))
|
||||
elseif data == "dpty" then return string.format("DPTY=%s\r\n", string.format("%d", get_rds_dpty()))
|
||||
elseif data == "tp" then return string.format("TP=%s\r\n", string.format("%d", get_rds_tp()))
|
||||
elseif data == "ta" then return string.format("TA=%s\r\n", string.format("%d", get_rds_ta()))
|
||||
-- TODO: more
|
||||
end
|
||||
end
|
||||
cmd = cmd:lower()
|
||||
@@ -131,6 +140,12 @@ if type(data) == "string" then
|
||||
if not timeout then return "-" end
|
||||
set_rds_rt_text_timeout(timeout)
|
||||
return "+"
|
||||
elseif cmd == "grpseq" then
|
||||
set_rds_grpseq(value)
|
||||
return "+"
|
||||
elseif cmd == "grpseq2" then
|
||||
set_rds_grpseq2(value)
|
||||
return "+"
|
||||
else
|
||||
return "?"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user