diff --git a/app/spectrum.c b/app/spectrum.c index 90a5b28..aa59a3b 100644 --- a/app/spectrum.c +++ b/app/spectrum.c @@ -62,17 +62,17 @@ const char *modulationTypeOptions[] = {" FM", " AM", "USB"}; const uint8_t modulationTypeTuneSteps[] = {100, 50, 10}; const uint8_t modTypeReg47Values[] = {1, 7, 5}; -SpectrumSettings settings = {STEPS_64, - S_STEP_25_0kHz, - 80000, - 3200, - 150, - true, - BK4819_FILTER_BW_WIDE, - BK4819_FILTER_BW_WIDE, - false, - -130, - -50}; +SpectrumSettings settings = {stepsCount: STEPS_64, + scanStepIndex: S_STEP_25_0kHz, + frequencyChangeStep: 80000, + scanDelay: 3200, + rssiTriggerLevel: 150, + backlightState: true, + bw: BK4819_FILTER_BW_WIDE, + listenBw: BK4819_FILTER_BW_WIDE, + modulationType: false, + dbMin: -130, + dbMax: -50}; uint32_t fMeasure = 0; uint32_t currentFreq, tempFreq; diff --git a/app/spectrum.h b/app/spectrum.h index d812dd0..8a97d3b 100644 --- a/app/spectrum.h +++ b/app/spectrum.h @@ -122,18 +122,21 @@ typedef enum ScanStep { } ScanStep; typedef struct SpectrumSettings { + uint32_t frequencyChangeStep; StepsCount stepsCount; ScanStep scanStepIndex; - uint32_t frequencyChangeStep; + uint16_t scanDelay; uint16_t rssiTriggerLevel; - bool backlightState; + BK4819_FilterBandwidth_t bw; BK4819_FilterBandwidth_t listenBw; - ModulationType modulationType; int dbMin; - int dbMax; + int dbMax; + ModulationType modulationType; + bool backlightState; + uint8_t _pad[2]; } SpectrumSettings; typedef struct KeyboardState { @@ -148,6 +151,7 @@ typedef struct ScanInfo { uint32_t f, fPeak; uint16_t scanStep; uint8_t measurementsCount; + uint8_t _pad[1]; } ScanInfo; typedef struct RegisterSpec { @@ -156,13 +160,15 @@ typedef struct RegisterSpec { uint8_t offset; uint16_t maxValue; uint16_t inc; + uint8_t _pad[2]; } RegisterSpec; typedef struct PeakInfo { uint16_t t; uint16_t rssi; - uint8_t i; uint32_t f; + uint8_t i; + uint8_t _pad[3]; } PeakInfo; void APP_RunSpectrum(void);