MDx: reorganized data structures for calibration data

This commit is contained in:
Silvano Seva 2024-09-28 20:54:06 +02:00
parent a4db8d2242
commit 8612b28215
1 changed files with 23 additions and 98 deletions

View File

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
* Copyright (C) 2020 - 2023 by Federico Amedeo Izzo IU2NUO, * * Copyright (C) 2020 - 2024 by Federico Amedeo Izzo IU2NUO, *
* Niccolò Izzo IU2KIN * * Niccolò Izzo IU2KIN *
* Frederik Saraci IU2NRO * * Frederik Saraci IU2NRO *
* Silvano Seva IU2KWO * * Silvano Seva IU2KWO *
@ -27,114 +27,39 @@
/** /**
* Data types defining the structure of calibration data stored in external * Data types defining the structure of calibration data stored in external
* flash memory of MDx devices. * flash memory of MDx devices.
*
* Single band and dual band devices use more or less the same calibration data
* entries, thus a single data structure have been made. The only difference
* between the two is that the dual band radios have five calibration points
* for the VHF band instead of nine.
*/ */
struct CalData
{
uint8_t freqAdjustMid;
freq_t rxFreq[9];
freq_t txFreq[9];
uint8_t txHighPower[9];
uint8_t txLowPower[9];
uint8_t rxSensitivity[9];
uint8_t sendIrange[9];
uint8_t sendQrange[9];
uint8_t analogSendIrange[9];
uint8_t analogSendQrange[9];
};
/** /**
* \brief Calibration data for MD-3x0. * \brief Calibration data for MD-3x0.
*/ */
typedef struct typedef struct CalData md3x0Calib_t;
{
uint8_t vox1;
uint8_t vox10;
uint8_t rxLowVoltage;
uint8_t rxFullVoltage;
uint8_t rssi1;
uint8_t rssi4;
uint8_t analogMic;
uint8_t digitalMic;
uint8_t freqAdjustHigh;
uint8_t freqAdjustMid;
uint8_t freqAdjustLow;
freq_t rxFreq[9];
freq_t txFreq[9];
uint8_t txHighPower[9];
uint8_t txLowPower[9];
uint8_t rxSensitivity[9];
uint8_t openSql9[9];
uint8_t closeSql9[9];
uint8_t openSql1[9];
uint8_t closeSql1[9];
uint8_t maxVolume[9];
uint8_t ctcss67Hz[9];
uint8_t ctcss151Hz[9];
uint8_t ctcss254Hz[9];
uint8_t dcsMod2[9];
uint8_t dcsMod1[9];
uint8_t mod1Partial[9];
uint8_t analogVoiceAdjust[9];
uint8_t lockVoltagePartial[9];
uint8_t sendIpartial[9];
uint8_t sendQpartial[9];
uint8_t sendIrange[9];
uint8_t sendQrange[9];
uint8_t rxIpartial[9];
uint8_t rxQpartial[9];
uint8_t analogSendIrange[9];
uint8_t analogSendQrange[9];
}
md3x0Calib_t;
typedef struct
{
uint8_t freqAdjustMid;
freq_t rxFreq[5];
freq_t txFreq[5];
uint8_t txHighPower[5];
uint8_t txMidPower[5];
uint8_t txLowPower[5];
uint8_t rxSensitivity[5];
uint8_t openSql9[5];
uint8_t closeSql9[5];
uint8_t openSql1[5];
uint8_t closeSql1[5];
uint8_t ctcss67Hz[5];
uint8_t ctcss151Hz[5];
uint8_t ctcss254Hz[5];
uint8_t dcsMod1[5];
uint8_t sendIrange[5];
uint8_t sendQrange[5];
uint8_t analogSendIrange[5];
uint8_t analogSendQrange[5];
}
VhfCalib_t;
typedef struct
{
uint8_t freqAdjustMid;
freq_t rxFreq[9];
freq_t txFreq[9];
uint8_t txHighPower[9];
uint8_t txMidPower[9];
uint8_t txLowPower[9];
uint8_t rxSensitivity[9];
uint8_t openSql9[9];
uint8_t closeSql9[9];
uint8_t openSql1[9];
uint8_t closeSql1[9];
uint8_t ctcss67Hz[9];
uint8_t ctcss151Hz[9];
uint8_t ctcss254Hz[9];
uint8_t dcsMod1[9];
uint8_t sendIrange[9];
uint8_t sendQrange[9];
uint8_t analogSendIrange[9];
uint8_t analogSendQrange[9];
}
UhfCalib_t;
/** /**
* \brief Calibration data for MD-UV3x0. * \brief Calibration data for MD-UV3x0.
*/ */
typedef struct typedef struct
{ {
uint8_t vox1; struct CalData uhfCal;
uint8_t vox10; struct CalData vhfCal;
uint8_t rxLowVoltage;
uint8_t rxFullVoltage;
uint8_t rssi1;
uint8_t rssi4;
VhfCalib_t vhfCal;
UhfCalib_t uhfCal;
} }
mduv3x0Calib_t; mduv3x0Calib_t;