Adding 8.33KHz spacing (#2628)

* Adding 8.33KHz spacing
* remove extern options_db_t freqman_steps which is now brought by ui_receiver.hpp
* use freqman db steps instead of static array
Co-authored-by: gullradriel <gullradriel@no-mail.com>
This commit is contained in:
Luca 2025-04-14 20:59:50 +02:00 committed by GitHub
parent 584af02dba
commit a153cbf30b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 17 deletions

View File

@ -46,7 +46,7 @@ using options_db_t = std::vector<option_db_t>;
extern options_db_t freqman_modulations; extern options_db_t freqman_modulations;
extern options_db_t freqman_bandwidths[5]; extern options_db_t freqman_bandwidths[5];
extern options_db_t freqman_steps; // extern options_db_t freqman_steps; // now included via ui_receiver.hpp
extern options_db_t freqman_steps_short; extern options_db_t freqman_steps_short;
options_t dboptions_to_options(const options_db_t& dboptions) { options_t dboptions_to_options(const options_db_t& dboptions) {

View File

@ -29,6 +29,7 @@
#include "irq_controls.hpp" #include "irq_controls.hpp"
#include "rf_path.hpp" #include "rf_path.hpp"
#include "freqman_db.hpp"
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
@ -37,6 +38,10 @@
#define MAX_UFREQ 7200000000 // maximum usable frequency #define MAX_UFREQ 7200000000 // maximum usable frequency
using option_db_t = std::pair<std::string_view, int32_t>;
using options_db_t = std::vector<option_db_t>;
extern options_db_t freqman_steps;
namespace ui { namespace ui {
class FrequencyField : public Widget { class FrequencyField : public Widget {
@ -263,22 +268,12 @@ class FrequencyStepView : public OptionsField {
: OptionsField{ : OptionsField{
parent_pos, parent_pos,
5, 5,
{ {}} {
{" 10", 10}, /* Fine tuning SSB voice pitch,in HF and QO-100 sat #669 */ options_t options;
{" 50", 50}, /* added 50Hz/10Hz,but we do not increase GUI digit decimal */ for (const auto& step : freqman_steps) {
{" 100", 100}, options.emplace_back(step.first, step.second);
{" 1k ", 1000}, }
{" 3k ", 3000}, /* Approximate SSB bandwidth */ set_options(options);
{" 5k ", 5000},
{" 6k3", 6250},
{" 9k ", 9000}, /* channel spacing for LF, MF in some regions */
{" 10k ", 10000},
{" 12k5", 12500},
{" 25k ", 25000},
{"100k ", 100000},
{" 1M ", 1000000},
{" 10M ", 10000000},
}} {
} }
}; };