Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions code/src/PhoenixSketch/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ float32_t audioYPixel[SPECTRUM_RES/4];

VolumeFunction volumeFunction = AudioVolume;

//#define BROADCAST_BAND 0
#define HAM_BAND 1
//#define MISC_BAND 2
struct band bands[NUMBER_OF_BANDS] =
{
//freqVFO1 freqVFO2 band low band hi name mode Hi Low Gain_dB type AGC
Expand Down Expand Up @@ -49,6 +46,7 @@ struct band bands[NUMBER_OF_BANDS] =
//435000000, 420000000, 450000000, "70CM", USB, 3000, 200, 0, HAM_BAND, 20, // 70CM
//915000000, 902000000, 928000000, "33CM", USB, 3000, 200, 0, HAM_BAND, 20, // 33CM
//1270000000, 1240000000, 1300000000, "23CM", USB, 3000, 200, 0, HAM_BAND, 20, // 23CM
200000, 200000, 80800000, "GEN", USB, 3000, 200, 0, MISC_BAND, 20, // General coverage
};

struct BIT bit_results = {
Expand Down
1 change: 1 addition & 0 deletions code/src/PhoenixSketch/LPFBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ void SelectLPFBand(int32_t band){
band = LAST_BAND + 10; // force it to pick no filter. You're on your own now
}
}

SET_LPF_BAND(BandToBCD(band));
// And now actually change the hardware...
UpdateMCPRegisters();
Expand Down
7 changes: 6 additions & 1 deletion code/src/PhoenixSketch/Mode.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "SDT.h"

// This file contains the entry and exit functions called upon changing states
// as well as functions used in guards

void UpdateHardwareState(void){
UpdateRFHardwareState();
Expand All @@ -16,4 +17,8 @@ void ModeCWTransmitSpaceEnter(void){
SetInterrupt(iKEY2_PRESSED);
}
UpdateHardwareState();
}
}

bool IsTxAllowed(void) {
return bands[ED.currentBand[ED.activeVFO]].band_type == HAM_BAND;
}
6 changes: 6 additions & 0 deletions code/src/PhoenixSketch/Mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ void UpdateHardwareState(void);
*/
void ModeCWTransmitSpaceEnter(void);

/**
* @brief Checks if transmit is allowed for the current band
* @note Used as guard for transitions to transmit states
*/
bool IsTxAllowed(void);

#endif // MODE_H
14 changes: 9 additions & 5 deletions code/src/PhoenixSketch/ModeSm.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated with StateSmith 0.19.0+b5719011215d41a81572ed347c02b22db5d1a48f.
// Autogenerated with StateSmith 0.20.0+43839dcc75301cd62cac3f27a49bbde57af7ebda.
// Algorithm: Balanced2. See https://github.com/StateSmith/StateSmith/wiki/Algorithms

// This file is autogenerated! Do not edit it directly. Instead, edit the companion .drawio
Expand Down Expand Up @@ -1205,7 +1205,8 @@ static void CW_RECEIVE_exit(ModeSm* sm)
static void CW_RECEIVE_dah_pressed(ModeSm* sm)
{
// CW_RECEIVE behavior
// uml: DAH_PRESSED TransitionTo(CW_TRANSMIT_DAH_MARK)
// uml: DAH_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_DAH_MARK)
if (IsTxAllowed())
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
CW_RECEIVE_exit(sm);
Expand All @@ -1225,7 +1226,8 @@ static void CW_RECEIVE_dah_pressed(ModeSm* sm)
static void CW_RECEIVE_dit_pressed(ModeSm* sm)
{
// CW_RECEIVE behavior
// uml: DIT_PRESSED TransitionTo(CW_TRANSMIT_DIT_MARK)
// uml: DIT_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_DIT_MARK)
if (IsTxAllowed())
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
CW_RECEIVE_exit(sm);
Expand Down Expand Up @@ -1257,7 +1259,8 @@ static void CW_RECEIVE_do(ModeSm* sm)
static void CW_RECEIVE_key_pressed(ModeSm* sm)
{
// CW_RECEIVE behavior
// uml: KEY_PRESSED TransitionTo(CW_TRANSMIT_MARK)
// uml: KEY_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_MARK)
if (IsTxAllowed())
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
CW_RECEIVE_exit(sm);
Expand Down Expand Up @@ -1703,7 +1706,8 @@ static void SSB_RECEIVE_exit(ModeSm* sm)
static void SSB_RECEIVE_ptt_pressed(ModeSm* sm)
{
// SSB_RECEIVE behavior
// uml: PTT_PRESSED TransitionTo(SSB_TRANSMIT)
// uml: PTT_PRESSED [IsTxAllowed()] TransitionTo(SSB_TRANSMIT)
if (IsTxAllowed())
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
SSB_RECEIVE_exit(sm);
Expand Down
376 changes: 192 additions & 184 deletions code/src/PhoenixSketch/ModeSm.drawio

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/src/PhoenixSketch/ModeSm.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated with StateSmith 0.19.0+b5719011215d41a81572ed347c02b22db5d1a48f.
// Autogenerated with StateSmith 0.20.0+43839dcc75301cd62cac3f27a49bbde57af7ebda.
// Algorithm: Balanced2. See https://github.com/StateSmith/StateSmith/wiki/Algorithms

// This file is autogenerated! Do not edit it directly. Instead, edit the companion .drawio
Expand Down
22 changes: 13 additions & 9 deletions code/src/PhoenixSketch/ModeSm.sim.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,15 @@

SSB_RECEIVE --> CW_RECEIVE : TO_CW_MODE

SSB_RECEIVE --> SSB_TRANSMIT : PTT_PRESSED
SSB_RECEIVE --> SSB_TRANSMIT : PTT_PRESSED [IsTxAllowed()]

CW_RECEIVE --> SSB_RECEIVE : TO_SSB_MODE

CW_RECEIVE --> CW_TRANSMIT_MARK : KEY_PRESSED
CW_RECEIVE --> CW_TRANSMIT_MARK : KEY_PRESSED [IsTxAllowed()]

CW_RECEIVE --> CW_TRANSMIT_DAH_MARK : DAH_PRESSED
CW_RECEIVE --> CW_TRANSMIT_DAH_MARK : DAH_PRESSED [IsTxAllowed()]

CW_RECEIVE --> CW_TRANSMIT_DIT_MARK : DIT_PRESSED
CW_RECEIVE --> CW_TRANSMIT_DIT_MARK : DIT_PRESSED [IsTxAllowed()]

SSB_TRANSMIT --> SSB_RECEIVE : PTT_RELEASED

Expand Down Expand Up @@ -507,7 +507,7 @@
</div>

<script>
// Autogenerated with StateSmith 0.19.0+b5719011215d41a81572ed347c02b22db5d1a48f.
// Autogenerated with StateSmith 0.20.0+43839dcc75301cd62cac3f27a49bbde57af7ebda.
// Algorithm: Balanced2. See https://github.com/StateSmith/StateSmith/wiki/Algorithms

// Generated state machine
Expand Down Expand Up @@ -1738,7 +1738,8 @@
#CW_RECEIVE_dah_pressed()
{
// CW_RECEIVE behavior
// uml: DAH_PRESSED / { this.tracer?.edgeTransition("edge24"); } TransitionTo(CW_TRANSMIT_DAH_MARK)
// uml: DAH_PRESSED [this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("CW_RECEIVE","DAH_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_DAH_MARK)")] / { this.tracer?.edgeTransition("edge24"); } TransitionTo(CW_TRANSMIT_DAH_MARK)
if (this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("CW_RECEIVE","DAH_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_DAH_MARK)"))
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
this.#CW_RECEIVE_exit();
Expand All @@ -1759,7 +1760,8 @@
#CW_RECEIVE_dit_pressed()
{
// CW_RECEIVE behavior
// uml: DIT_PRESSED / { this.tracer?.edgeTransition("edge25"); } TransitionTo(CW_TRANSMIT_DIT_MARK)
// uml: DIT_PRESSED [this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("CW_RECEIVE","DIT_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_DIT_MARK)")] / { this.tracer?.edgeTransition("edge25"); } TransitionTo(CW_TRANSMIT_DIT_MARK)
if (this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("CW_RECEIVE","DIT_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_DIT_MARK)"))
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
this.#CW_RECEIVE_exit();
Expand Down Expand Up @@ -1792,7 +1794,8 @@
#CW_RECEIVE_key_pressed()
{
// CW_RECEIVE behavior
// uml: KEY_PRESSED / { this.tracer?.edgeTransition("edge23"); } TransitionTo(CW_TRANSMIT_MARK)
// uml: KEY_PRESSED [this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("CW_RECEIVE","KEY_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_MARK)")] / { this.tracer?.edgeTransition("edge23"); } TransitionTo(CW_TRANSMIT_MARK)
if (this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("CW_RECEIVE","KEY_PRESSED [IsTxAllowed()] TransitionTo(CW_TRANSMIT_MARK)"))
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
this.#CW_RECEIVE_exit();
Expand Down Expand Up @@ -2343,7 +2346,8 @@
#SSB_RECEIVE_ptt_pressed()
{
// SSB_RECEIVE behavior
// uml: PTT_PRESSED / { this.tracer?.edgeTransition("edge21"); } TransitionTo(SSB_TRANSMIT)
// uml: PTT_PRESSED [this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("SSB_RECEIVE","PTT_PRESSED [IsTxAllowed()] TransitionTo(SSB_TRANSMIT)")] / { this.tracer?.edgeTransition("edge21"); } TransitionTo(SSB_TRANSMIT)
if (this.tracer?.log("🛡️ User evaluating guard: " + "IsTxAllowed()") || this.evaluateGuard("SSB_RECEIVE","PTT_PRESSED [IsTxAllowed()] TransitionTo(SSB_TRANSMIT)"))
{
// Step 1: Exit states until we reach `NORMAL_STATES` state (Least Common Ancestor for transition).
this.#SSB_RECEIVE_exit();
Expand Down
64 changes: 37 additions & 27 deletions code/src/PhoenixSketch/SDT.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ extern uint64_t hardwareRegister;
#define BAND_10M 9
#define BAND_6M 10
#define BAND_4M 11
#define BAND_GENERAL 12
#define FIRST_BAND BAND_160M
#define LAST_BAND BAND_6M
#define NUMBER_OF_BANDS 12
#define LAST_BAND BAND_GENERAL
#define NUMBER_OF_BANDS 13
#define MAX_FAVORITES 13

// Zoom
Expand Down Expand Up @@ -251,7 +252,7 @@ extern struct config_t {
NoiseReductionType nrOptionSelect = NROff; /** Noise reduction mode */
uint8_t ANR_notchOn = 0; /** Automatic notch filter on/off */
int32_t spectrumScale = 1; /** dB/pixel selection for spectrum display */
int16_t spectrumNoiseFloor[NUMBER_OF_BANDS] = {50,50,50,50,50,50,50,50,50,50,50,50}; /** Shift spectrum up/down on display */
int16_t spectrumNoiseFloor[NUMBER_OF_BANDS] = {50,50,50,50,50,50,50,50,50,50,50,50,50 }; /** Shift spectrum up/down on display */
int8_t spectrumFloorAuto = 1; /** Automatically adjust the spectrum floor */
uint32_t spectrum_zoom = 1; /** Zoom level for spectrum */
int32_t CWFilterIndex = 5; /** Selects the receive CW audio filter */
Expand All @@ -270,43 +271,46 @@ extern struct config_t {
int32_t equalizerRec[EQUALIZER_CELL_COUNT] = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; /** Receive audio equalizer amplitudes */
int32_t equalizerXmt[EQUALIZER_CELL_COUNT] = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; /** Transmit audio equalizer amplitudes */
int32_t currentMicGain = 20; /** Gain of the mic used for SSB */
float32_t dbm_calibration[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** Calibrates the S-meter scale on the display */
float32_t dbm_calibration[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** Calibrates the S-meter scale on the display */
float32_t powerOutCW[NUMBER_OF_BANDS] = {DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL}; /** Set output power in Watts in CW mode */
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
0}; /** Set output power in Watts in CW mode */
float32_t powerOutSSB[NUMBER_OF_BANDS] = {DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL}; /** Set output power in Watts in SSB mode */
float32_t IQAmpCorrectionFactor[NUMBER_OF_BANDS] = {1,1,1,1,1,1,1,1,1,1,1,1}; /** Receive IQ calibration amplitude correction */
float32_t IQPhaseCorrectionFactor[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** Receive IQ calibration phase correction */
float32_t IQXAmpCorrectionFactor[NUMBER_OF_BANDS] = {1,1,1,1,1,1,1,1,1,1,1,1}; /** Transmit IQ calibration amplitude correction */
float32_t IQXPhaseCorrectionFactor[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** Transmit IQ calibration phase correction */
int16_t DCOffsetI[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** Transmit carrier nulling correction, I */
int16_t DCOffsetQ[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** Transmit carrier nulling correction, Q */
float32_t XAttenCW[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** RF board transmit attenuation in CW mode */
DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,DEFAULT_POWER_LEVEL,
0}; /** Set output power in Watts in SSB mode */
float32_t IQAmpCorrectionFactor[NUMBER_OF_BANDS] = {1,1,1,1,1,1,1,1,1,1,1,1,1}; /** Receive IQ calibration amplitude correction */
float32_t IQPhaseCorrectionFactor[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** Receive IQ calibration phase correction */
float32_t IQXAmpCorrectionFactor[NUMBER_OF_BANDS] = {1,1,1,1,1,1,1,1,1,1,1,1,1}; /** Transmit IQ calibration amplitude correction */
float32_t IQXPhaseCorrectionFactor[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** Transmit IQ calibration phase correction */
int16_t DCOffsetI[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** Transmit carrier nulling correction, I */
int16_t DCOffsetQ[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** Transmit carrier nulling correction, Q */
float32_t XAttenCW[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** RF board transmit attenuation in CW mode */
// XAtten is only used in CW mode
//float32_t XAttenSSB[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** RF board transmit attenuation in SSB mode */
float32_t RAtten[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** RF board receive attenuation */
//float32_t XAttenSSB[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** RF board transmit attenuation in SSB mode */
float32_t RAtten[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** RF board receive attenuation */
int64_t lastFrequencies[NUMBER_OF_BANDS][3] = {{1850000,0,1},{3700000,0,1},{5351500,0,0},
{7150000,0,1},{10125000,0,0},{14200000,0,0},{18100000,0,0},
{21200000,0,0},{24920000,0,0},{28350000,0,0},{50100000,0,0},{70300000,0,0}}; /** center tune, fine tune, modulation */
int32_t antennaSelection[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** Antenna selection per band */
{21200000,0,0},{24920000,0,0},{28350000,0,0},{50100000,0,0},{70300000,0,0},
{10000000,0,1}}; /** center tune, fine tune, modulation */
int32_t antennaSelection[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** Antenna selection per band */
bool keyerFlip = KEYER_FLIP; /**false = right paddle = DAH, true = DIT */
bool PA100Wactive = false;
float32_t PowerCal_20W_Psat_mW[NUMBER_OF_BANDS] = {14680,14680,14680,14680,14680,14680,14680,14680,14680,14680,14680,14680}; /** The saturation power output level when 20W PA is used */
float32_t PowerCal_20W_kindex[NUMBER_OF_BANDS] = {16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2}; /** k index parameterizes the knee location in the Pout vs attenuation */
float32_t PowerCal_100W_Psat_mW[NUMBER_OF_BANDS] = {86000,86000,86000,86000,86000,86000,86000,86000,86000,86000,86000,86000}; /** The saturation power output level when 100W PA is used */
float32_t PowerCal_20W_Psat_mW[NUMBER_OF_BANDS] = {14680,14680,14680,14680,14680,14680,14680,14680,14680,14680,14680,14680,0}; /** The saturation power output level when 20W PA is used */
float32_t PowerCal_20W_kindex[NUMBER_OF_BANDS] = {16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,16.2,0}; /** k index parameterizes the knee location in the Pout vs attenuation */
float32_t PowerCal_100W_Psat_mW[NUMBER_OF_BANDS] = {86000,86000,86000,86000,86000,86000,86000,86000,86000,86000,86000,86000,0}; /** The saturation power output level when 100W PA is used */
float32_t PowerCal_100W_kindex[NUMBER_OF_BANDS] = {10,10,10,10,10,10,10,10,10,10,10,10}; /** k index parameterizes the knee location in the Pout vs attenuation */
float32_t PowerCal_20W_to_100W_threshold_W = 20.0; /** The power threshold that switches in the 100W amplifier */
float32_t PowerCal_20W_DSP_Gain_correction_dB[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** DSP gain applied to the TX SSB chain to fix band-to-band gain differences */
float32_t PowerCal_100W_DSP_Gain_correction_dB[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** DSP gain applied to the TX SSB chain to fix band-to-band gain differences */
float32_t PowerCal_20W_DSP_Gain_correction_dB[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** DSP gain applied to the TX SSB chain to fix band-to-band gain differences */
float32_t PowerCal_100W_DSP_Gain_correction_dB[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** DSP gain applied to the TX SSB chain to fix band-to-band gain differences */

float32_t SWR_F_SlopeAdj[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** SWR calibration */
float32_t SWR_R_SlopeAdj[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** SWR calibration */
float32_t SWR_R_Offset[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** SWR calibration */
float32_t SWR_F_Offset[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0}; /** SWR calibration */
float32_t SWR_F_SlopeAdj[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** SWR calibration */
float32_t SWR_R_SlopeAdj[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; /** SWR calibration */
float32_t SWR_R_Offset[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0.0}; /** SWR calibration */
float32_t SWR_F_Offset[NUMBER_OF_BANDS] = {0,0,0,0,0,0,0,0,0,0,0,0.0}; /** SWR calibration */
} ED;

// Define a structure to hold the results of built-in-test routine
Expand All @@ -320,6 +324,12 @@ struct BIT {
uint8_t AD7991_I2C_ADDR;
};

enum BandType {
BROADCAST_BAND,
HAM_BAND,
MISC_BAND
};

/** Contains the parameters that define a band */
struct band {
int64_t freqVFO1_Hz; /** Frequency of VFO1 in Hz (hardware mixer) */
Expand All @@ -330,7 +340,7 @@ struct band {
int32_t FHiCut_Hz; /** Audio bandpass filter edge */
int32_t FLoCut_Hz; /** Audio bandpass filter edge */
float32_t RFgain_dB; /** Gain applied in the DSP receive chain */
uint8_t band_type; /** UNUSED */
BandType band_type; /** type of band */
int32_t AGC_thresh; /** AGC threshold value used by DSP receive code */
};

Expand Down
Loading
Loading