0
1
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:
2025-12-22 18:18:01 +01:00
parent bd16b9c4a3
commit 2f30bfb925
4 changed files with 85 additions and 22 deletions

View File

@@ -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