mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-17 06:02:19 -04:00
Make better use of range_t methods.
This commit is contained in:
parent
ca3b1a2c5a
commit
7519b83379
8 changed files with 39 additions and 72 deletions
|
@ -83,13 +83,11 @@ Config high_band(const rf::Frequency target_frequency) {
|
|||
|
||||
Config create(const rf::Frequency target_frequency) {
|
||||
/* TODO: This is some lame code. */
|
||||
if( target_frequency < rf::path::band_low.min ) {
|
||||
return { };
|
||||
} else if( target_frequency < rf::path::band_low.max ) {
|
||||
if( rf::path::band_low.contains(target_frequency) ) {
|
||||
return low_band(target_frequency);
|
||||
} else if( target_frequency < rf::path::band_mid.max ) {
|
||||
} else if( rf::path::band_mid.contains(target_frequency) ) {
|
||||
return mid_band(target_frequency);
|
||||
} else if( target_frequency < rf::path::band_high.max ) {
|
||||
} else if( rf::path::band_high.contains(target_frequency) ) {
|
||||
return high_band(target_frequency);
|
||||
} else {
|
||||
return { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue