summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lmx2487lib.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/lmx2487lib.lua b/lmx2487lib.lua
index bfaf717..ce504c7 100644
--- a/lmx2487lib.lua
+++ b/lmx2487lib.lua
@@ -102,7 +102,7 @@ mask_bits5to24=bit.bor(mask_bits5to14, mask_bits15to24)
mask_low12bits = bit.bit(12)-1
mask_bits13andAbove = bit.bnot(mask_low12bits)
-function FreqToSettingsBin(freq)
+function FreqToSettings(freq)
local freq, RF_N, RF_FN, RF_FD = freq2regestersValues(freq)
R0_new=get_lmx2487register(0)
R1_new=get_lmx2487register(1)
@@ -145,36 +145,36 @@ end
-- test setFreq
set_lmx2487_board_to_default_state()
-FreqToSettingsBin(6.834e9)
+FreqToSettings(6.834e9)
if
get_lmx2487register(0) ~= 11192320
and get_lmx2487register(1) ~= 4362243
and get_lmx2487register(2) ~= 8560613 -- should not change
and get_lmx2487register(5) ~= 16003291
then
- print("ERROR in FreqToSettingsBin: registers do not match")
+ print("ERROR in FreqToSettings: registers do not match")
end
-FreqToSettingsBin(6.8204e9)
+FreqToSettings(6.8204e9)
if
get_lmx2487register(0) ~= 11174912
and get_lmx2487register(1) ~= 4362243 -- should not change
and get_lmx2487register(2) ~= 8560613 -- should not change
and get_lmx2487register(5) ~= 15992043
then
- print("ERROR in FreqToSettingsBin: registers do not match")
+ print("ERROR in FreqToSettings: registers do not match")
end
-FreqToSettingsBin(6.8346e9)
+FreqToSettings(6.8346e9)
if
get_lmx2487register(0) ~= 11193856
and get_lmx2487register(1) ~= 4362243 -- should not change
and get_lmx2487register(2) ~= 8560613 -- should not change
and get_lmx2487register(5) ~= 16005163
then
- print("ERROR in FreqToSettingsBin: registers do not match")
+ print("ERROR in FreqToSettings: registers do not match")
end
function setFreq(freq)
- FreqToSettingsBin(freq)
+ FreqToSettings(freq)
update_lmx2487state()
end