From 0bbf887ec533c4537920934667ff3baa538d994c Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 31 May 2022 15:42:03 -0400 Subject: added getFreq() function --- lmx2487lib.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lmx2487lib.lua b/lmx2487lib.lua index 42f94be..860102b 100644 --- a/lmx2487lib.lua +++ b/lmx2487lib.lua @@ -8,6 +8,7 @@ Eugeniy Mikhailov lmx2487_registers = {0, 0, 0, 0, 0, 0, 0, 0} -- if a register needs update set to true, updater script will resend this register lmx2487_need_update = {true, true, true, true, true, true, true, true} +freqVal = nil function set_lmx2487register(value, register) -- register labeled 0, 1, 2, ..., 7 @@ -171,7 +172,13 @@ then end function setFreq(freq) + freqVal = freq FreqToSettings(freq) update_lmx2487state() end +function getFreq() + print(freqVal) + return(freqVal) +end + -- cgit v1.2.3