mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-26 20:33:53 +01:00
more commands and even more in lua api
This commit is contained in:
@@ -4,6 +4,9 @@ if type(data) == "string" then
|
||||
data = data:lower()
|
||||
if data == "ver" then
|
||||
return string.format("rds95 v. %s - (C) 2025 radio95 - lua parser", core_version)
|
||||
elseif data == "init" then
|
||||
set_rds_program_defaults()
|
||||
return "+"
|
||||
end
|
||||
end
|
||||
cmd = cmd:lower()
|
||||
@@ -112,6 +115,7 @@ if type(data) == "string" then
|
||||
elseif cmd == "program" then
|
||||
local program = tonumber(value)
|
||||
if not program then return "-" end
|
||||
if program < 1 then return "-" end
|
||||
set_rds_program(program-1)
|
||||
return "+"
|
||||
elseif cmd == "level" then
|
||||
@@ -119,6 +123,11 @@ if type(data) == "string" then
|
||||
if not level then return "-" end
|
||||
set_rds_level(level/255)
|
||||
return "+"
|
||||
elseif cmd == "dttmout" then
|
||||
local timeout = tonumber(value)
|
||||
if not timeout then return "-" end
|
||||
set_rds_rt_text_timeout(timeout)
|
||||
return "+"
|
||||
else
|
||||
return "?"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user