mirror of
https://github.com/juribeparada/MMDVM_HS.git
synced 2026-04-05 14:25:28 +00:00
Add banned frequency ranges
This commit is contained in:
parent
bc48446e77
commit
7020510f2e
2 changed files with 16 additions and 0 deletions
9
IO.cpp
9
IO.cpp
|
|
@ -323,6 +323,15 @@ uint8_t CIO::setFreq(uint32_t frequency_rx, uint32_t frequency_tx, uint8_t rf_po
|
|||
((pocsag_freq_tx >= UHF2_MIN)&&(pocsag_freq_tx < UHF2_MAX)) ) )
|
||||
return 4U;
|
||||
|
||||
// Check banned frequency ranges
|
||||
if( ((frequency_rx >= BAN1_MIN)&&(frequency_rx <= BAN1_MAX)) || ((frequency_tx >= BAN1_MIN)&&(frequency_tx <= BAN1_MAX)) || \
|
||||
((frequency_rx >= BAN2_MIN)&&(frequency_rx <= BAN2_MAX)) || ((frequency_tx >= BAN2_MIN)&&(frequency_tx <= BAN2_MAX)) )
|
||||
return 4U;
|
||||
|
||||
if( ((pocsag_freq_tx >= BAN1_MIN)&&(pocsag_freq_tx <= BAN1_MAX)) || \
|
||||
((pocsag_freq_tx >= BAN2_MIN)&&(pocsag_freq_tx <= BAN2_MAX)) )
|
||||
return 4U;
|
||||
|
||||
// Configure frequency
|
||||
m_frequency_rx = frequency_rx;
|
||||
m_frequency_tx = frequency_tx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue