0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

make lua work on return

This commit is contained in:
2025-12-22 15:03:12 +01:00
parent f2dcf8563c
commit 1a747d9264
2 changed files with 18 additions and 25 deletions

View File

@@ -1,15 +1,11 @@
cmd_output = ""
if type(cmd) == "string" then
if cmd:sub(1, 3) == "PI=" then
local hex = cmd:sub(7)
local pi = tonumber(hex, 16)
if pi then
set_rds_pi(pi)
cmd_output = string.format("+", pi)
else
cmd_output = "Invalid hex PI"
end
end
end
-- if type(cmd) == "string" then
-- if cmd:sub(1, 3) == "PI=" then
-- local hex = cmd:sub(7)
-- local pi = tonumber(hex, 16)
-- if (pi & 0xf000) == 0 then return "-" end
-- if pi then
-- set_rds_pi(pi)
-- return "+"
-- end
-- end
-- end