0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 12:32:05 +01:00

some adjustments and smart detections

This commit is contained in:
2025-12-28 16:01:15 +01:00
parent c56e932c93
commit 0c61435a26
5 changed files with 86 additions and 47 deletions

View File

@@ -42,6 +42,7 @@ end
---@param fun ODAHandler
function set_oda_handler(oda_id, fun)
if oda_id > #_RDS_ODAs then return end
if _RDS_ODAs.group == 3 then error("3A ODAs cannot have handlers.") end
_RDS_ODAs[oda_id].handler = fun
end
@@ -90,4 +91,11 @@ function group(group_type)
end
end
return false, 0, 0, 0
end
local _old_on_state_oda = on_state
function on_state()
_RDS_ODAs = {}
_RDS_ODA_pointer = 1
if type(_old_on_state_oda) == "function" then _old_on_state_oda() end
end