diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-10 22:56:04 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-10 23:32:49 -0400 |
commit | d2997d3efe36f4c4a7acacbbabc9a2a86bfe6bd1 (patch) | |
tree | 3f1bb553af80e1b7358df04b6ad2e951396a79f0 /freq2lmx2487settings.lua | |
parent | dd51ec5f1e5357cfd7f50f6751d43a378f4b21df (diff) | |
download | nodeMCU_rf_source_lmx2487-d2997d3efe36f4c4a7acacbbabc9a2a86bfe6bd1.tar.gz nodeMCU_rf_source_lmx2487-d2997d3efe36f4c4a7acacbbabc9a2a86bfe6bd1.zip |
added test case for global registers when setFreq is called
Diffstat (limited to 'freq2lmx2487settings.lua')
-rw-r--r-- | freq2lmx2487settings.lua | 31 |
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 + |