summaryrefslogtreecommitdiff
path: root/freq2lmx2487settings.lua
diff options
context:
space:
mode:
Diffstat (limited to 'freq2lmx2487settings.lua')
-rw-r--r--freq2lmx2487settings.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/freq2lmx2487settings.lua b/freq2lmx2487settings.lua
index 8a9cce6..9c52bbb 100644
--- a/freq2lmx2487settings.lua
+++ b/freq2lmx2487settings.lua
@@ -128,3 +128,34 @@ function setFreq(freq)
set_lmx2487_board_to_new_state(settings)
end
+-- test setFreq
+set_lmx2487_board_to_default_state()
+settings= initSettings()
+setFreq(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 setFreq: registers do not match")
+end
+setFreq(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 setFreq: registers do not match")
+end
+setFreq(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 setFreq: registers do not match")
+end
+