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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 2436 additions and 2313 deletions

View file

@ -288,6 +288,10 @@ struct data_t {
// Recon App
uint64_t recon_config;
// HamItUp (+125MHz offset by default, configurable)
bool hamitup;
int64_t hamitup_freq;
constexpr data_t() :
structure_version(data_structure_version_enum::VERSION_CURRENT),
tuned_frequency(tuned_frequency_reset_value),
@ -315,7 +319,9 @@ struct data_t {
tone_mix(tone_mix_reset_value),
hardware_config(0),
recon_config(0)
recon_config(0),
hamitup(0),
hamitup_freq(125000000)
{
}
};
@ -733,6 +739,17 @@ void set_recon_load_hamradios(const bool v ){
void set_recon_match_mode(const bool v ) {
data->recon_config = (data->recon_config & ~0x00800000UL) | (v << 23);
}
bool config_hamitup() {
return data->hamitup;
}
void set_config_hamitup(const bool v ){
data-> hamitup = v ;
}
int64_t config_hamitup_freq() {
return data->hamitup_freq ;
}
void set_config_hamitup_freq(const int64_t v ){
data-> hamitup_freq = v ;
}
} /* namespace persistent_memory */
} /* namespace portapack */