Added HamItUp option (#840)

* Added HamItUp option to allow quick offset of the tuned frequency
* New HamItUp icon for top bar
* HamItUp checkbox status and frequency persistent settings in Settings/Radio
This commit is contained in:
gullradriel
2023-03-22 08:46:58 +01:00
committed by GitHub
parent 2457ba016f
commit 92b622deac
25 changed files with 2436 additions and 2313 deletions

View File

@@ -40,6 +40,7 @@ using namespace hackrf::one;
#include "cpld_update.hpp"
#include "portapack.hpp"
#include "portapack_persistent_memory.hpp"
namespace radio {
@@ -168,7 +169,11 @@ void set_direction(const rf::Direction new_direction) {
}
bool set_tuning_frequency(const rf::Frequency frequency) {
const auto tuning_config = tuning::config::create(frequency);
rf::Frequency final_frequency = frequency ;
if( portapack::persistent_memory::config_hamitup() ) {
final_frequency = frequency + portapack::persistent_memory::config_hamitup_freq();
}
const auto tuning_config = tuning::config::create(final_frequency);
if( tuning_config.is_valid() ) {
first_if.disable();