large pi and better readme

This commit is contained in:
2026-01-03 12:19:29 +01:00
parent 71e2d4c863
commit 7bd8970434
3 changed files with 35 additions and 8 deletions

View File

@@ -1,19 +1,26 @@
# Lua host
This is an WIP lua host for rds spy, a plugin
Compile this under MINGW32, not 64, RDS Spy lives in the past where men who couldn't count to 4294967295 still walked the planet
Compile this under MINGW32, not 64, RDS Spy lives in the past where men who couldn't count to 4294967296 in a CPU word still walked the planet
Project stared 1st of January, 2026 (or 7 haha)
Project started 1st of January, 2026
Aside from all that, this it loads and executes the script at "%LOCALAPPDATA%\RDS Spy\script.lua", with the api in the `plugin.lua` meta-file
Aside from all that, this loads and executes the script at "%LOCALAPPDATA%\RDS Spy\script.lua", with the api in the `plugin.lua` meta-file
## Why?
Ask Jan Kolar why his funny little rds decoder doesn't have Enchanced RT (excluding the 0x6552 to ERT mapping of course)
Ask Jan Kolar why his funny little rds decoder doesn't have Enchanced RT (excluding the 0x6552 to ERT mapping of course). Yes, no eRT decoding is really why is this, because why decode RDS in C (or even delphi ughhh) when you can just do it in lua!
Also RDS Surveyor doesn't take line-in MPX input
# Scripts
Inside of the examples folder you have `basic.lua` which mostly replaced the `basic.dll` plugin in RDS Spy
Note that you can double click on the buttons, if you try it
Inside of the examples folder you have `basic.lua` which mostly replaces the `basic.dll` plugin in RDS Spy
Another note is that on menu 0 you have the PI and PS in a large font, why? democracy? or something like that ([forum post](https://pira.cz/forum/index.php?topic=1124.0))
I have also included `large_pi.lua`, while `basic.lua` already shows the PS and PI on a large font, this does only the large PI and PS but in a even larger font. event 1 toggles stickyness
# Console
You have a console window generated by this plugin which has as of now 8 buttons where the first if you double-click the "Reload" button, I don't know what it does but maybe it reloads the script?
The other 7 send events to the Lua script, you can use this with the console mode:true to display diffrent "menus" on the console, double clicking also sends a unique event

20
examples/large_pi.lua Normal file
View File

@@ -0,0 +1,20 @@
set_console_mode(true)
set_font_size(148)
local last_pi = "----"
local last_ps = "--------"
function group(...)
local pi = db.read_value("PI") or "----"
local ps = db.read_value("PS") or "--------"
if last_pi ~= pi or last_ps ~= ps then
set_console(string.format("%s\r\n%s", pi, ps))
last_pi = pi
last_ps = ps
end
end
function event(event)
if event == 1 then
set_window_stick(not get_window_stick())
end
end

View File

@@ -71,7 +71,7 @@ function db.read_record(index) end
---@param value string
function db.add_value(key, value) end
function db.reset_values(key, value) end
function db.reset_values() end
---@return integer
function db.count_records(key, value) end