mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-26 22:37:13 -05:00
changing logic to take 'up' or 'down' in account
This commit is contained in:
parent
e045628dab
commit
f994f8d697
@ -170,8 +170,17 @@ void set_direction(const rf::Direction new_direction) {
|
|||||||
|
|
||||||
bool set_tuning_frequency(const rf::Frequency frequency) {
|
bool set_tuning_frequency(const rf::Frequency frequency) {
|
||||||
rf::Frequency final_frequency = frequency ;
|
rf::Frequency final_frequency = frequency ;
|
||||||
if( portapack::persistent_memory::config_hamitup() ) {
|
// if feature is enabled
|
||||||
final_frequency = frequency + portapack::persistent_memory::config_hamitup_freq();
|
if( portapack::persistent_memory::config_converter() ) {
|
||||||
|
//downconvert
|
||||||
|
if( portapack::persistent_memory::config_updown_converter() )
|
||||||
|
{
|
||||||
|
final_frequency = frequency - portapack::persistent_memory::config_converter_freq();
|
||||||
|
}
|
||||||
|
else //upconvert
|
||||||
|
{
|
||||||
|
final_frequency = frequency + portapack::persistent_memory::config_converter_freq();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const auto tuning_config = tuning::config::create(final_frequency);
|
const auto tuning_config = tuning::config::create(final_frequency);
|
||||||
if( tuning_config.is_valid() ) {
|
if( tuning_config.is_valid() ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user