Porównaj commity

...

5 Commity

Autor SHA1 Wiadomość Data
PianetaRadio d8c9bf1594
Add files via upload 2022-12-09 00:11:08 +01:00
PianetaRadio 1cbbc555af
Hamlib 4.5.1 2022-12-09 00:05:31 +01:00
PianetaRadio 0e19ee12cd
Meter peak hold
#34
2022-12-09 00:00:47 +01:00
PianetaRadio d2db142e34
COM port list
#32
2022-12-08 21:08:38 +01:00
PianetaRadio 4de9e1647b
COM port list
#32
2022-12-08 21:06:19 +01:00
10 zmienionych plików z 96 dodań i 53 usunięć

Wyświetl plik

@ -2,6 +2,10 @@ CatRadio
(+ New, * Updated, - Removed)
1.4.0 - 2022-mm-dd
* Bug fix: COM port list
* Updated to library Hamlib 4.5.1
1.3.0 - 2022-11-24
+ Radio info
+ Dark theme

Wyświetl plik

@ -52,7 +52,11 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBox_comPort"/>
<widget class="QComboBox" name="comboBox_comPort">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_serialSpeed">

Wyświetl plik

@ -5,7 +5,7 @@
#define ABI_AGE 0
/* Frontend ABI revision */
#define ABI_REVISION 5
#define ABI_REVISION 6
/* Frontend ABI version */
#define ABI_VERSION 4
@ -321,6 +321,9 @@
/* Define to 1 if you have the `usleep' function. */
#define HAVE_USLEEP 1
/* Define if usrp is available */
/* #undef HAVE_USRP */
/* Define to 1 if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
@ -342,6 +345,9 @@
/* Define to 1 if you have the <wspiapi.h> header file. */
#define HAVE_WSPIAPI_H 1
/* Define if libxml2 is available */
/* #undef HAVE_XML2 */
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
@ -358,7 +364,7 @@
#define PACKAGE_NAME "Hamlib"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Hamlib 4.5"
#define PACKAGE_STRING "Hamlib 4.5.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "hamlib"
@ -367,7 +373,7 @@
#define PACKAGE_URL "http://www.hamlib.org"
/* Define to the version of this package. */
#define PACKAGE_VERSION "4.5"
#define PACKAGE_VERSION "4.5.1"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
@ -407,7 +413,7 @@
/* Version number of package */
#define VERSION "4.5"
#define VERSION "4.5.1"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -315,17 +315,17 @@ enum serial_control_state_e {
* \brief Rig type flags
*/
typedef enum {
RIG_FLAG_RECEIVER = (1 << 1), /*!< Receiver */
RIG_FLAG_TRANSMITTER = (1 << 2), /*!< Transmitter */
RIG_FLAG_SCANNER = (1 << 3), /*!< Scanner */
RIG_FLAG_MOBILE = (1 << 4), /*!< mobile sized */
RIG_FLAG_HANDHELD = (1 << 5), /*!< handheld sized */
RIG_FLAG_COMPUTER = (1 << 6), /*!< "Computer" rig */
RIG_FLAG_TRUNKING = (1 << 7), /*!< has trunking */
RIG_FLAG_APRS = (1 << 8), /*!< has APRS */
RIG_FLAG_TNC = (1 << 9), /*!< has TNC */
RIG_FLAG_DXCLUSTER = (1 << 10), /*!< has DXCluster */
RIG_FLAG_TUNER = (1 << 11) /*!< dumb tuner */
RIG_FLAG_RECEIVER = (1 << 1), /*!< Receiver 2 */
RIG_FLAG_TRANSMITTER = (1 << 2), /*!< Transmitter 4 */
RIG_FLAG_SCANNER = (1 << 3), /*!< Scanner 8 */
RIG_FLAG_MOBILE = (1 << 4), /*!< mobile sized 16 */
RIG_FLAG_HANDHELD = (1 << 5), /*!< handheld sized 32 */
RIG_FLAG_COMPUTER = (1 << 6), /*!< "Computer" rig 64 */
RIG_FLAG_TRUNKING = (1 << 7), /*!< has trunking 128 */
RIG_FLAG_APRS = (1 << 8), /*!< has APRS 256 */
RIG_FLAG_TNC = (1 << 9), /*!< has TNC 512 */
RIG_FLAG_DXCLUSTER = (1 << 10), /*!< has DXCluster 1024 */
RIG_FLAG_TUNER = (1 << 11) /*!< dumb tuner 2048 */
} rig_type_t;
/**
@ -337,9 +337,11 @@ enum agc_level_e {
RIG_AGC_SUPERFAST,
RIG_AGC_FAST,
RIG_AGC_SLOW,
RIG_AGC_USER, /*!< user selectable */
RIG_AGC_USER, /*!< user selectable -- RIG_LEVEL_AGC to set USER level */
RIG_AGC_MEDIUM,
RIG_AGC_AUTO
RIG_AGC_AUTO,
RIG_AGC_LONG,
RIG_AGC_ON /*< Turns AGC ON -- Kenwood -- restores last level set */
};
@ -598,10 +600,8 @@ typedef unsigned int vfo_t;
*/
typedef shortfreq_t pbwidth_t;
typedef float agc_time_t;
/**
* \brief DCD status
*/
typedef enum dcd_e {
RIG_DCD_OFF = 0, /*!< Squelch closed */
RIG_DCD_ON /*!< Squelch open */
@ -901,7 +901,7 @@ typedef unsigned int ant_t;
//! @cond Doxygen_Suppress
#define RIG_AGC_LAST RIG_AGC_AUTO
#define RIG_AGC_LAST -1
//! @endcond
#if 1 // deprecated
@ -978,7 +978,7 @@ typedef uint64_t rig_level_e;
#define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24) /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, arg int (Hz) */
#define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25) /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */
/*!< These are not settable */
/*!< Some of these are not settable after this point */
#define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26) /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */
//#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
#define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28) /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */
@ -1004,8 +1004,8 @@ typedef uint64_t rig_level_e;
#define RIG_LEVEL_SPECTRUM_ATT CONSTANT_64BIT_FLAG(47) /*!< \c SPECTRUM_ATT -- Spectrum scope attenuator, arg int (dB). Supported attenuator values defined in rig caps. */
#define RIG_LEVEL_TEMP_METER CONSTANT_64BIT_FLAG(48) /*!< \c TEMP_METER -- arg float (C, centigrade) */
#define RIG_LEVEL_BAND_SELECT CONSTANT_64BIT_FLAG(49) /*!< \c BAND_SELECT -- arg enum BAND_ENUM */
#define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50) /*!< \c Future use */
#define RIG_LEVEL_51 CONSTANT_64BIT_FLAG(51) /*!< \c Future use */
#define RIG_LEVEL_USB_AF CONSTANT_64BIT_FLAG(50) /*!< \c ACC/USB AF output level */
#define RIG_LEVEL_AGC_TIME CONSTANT_64BIT_FLAG(51) /*!< \c AGC_TIME -- in seconds, rig dependent */
#define RIG_LEVEL_52 CONSTANT_64BIT_FLAG(52) /*!< \c Future use */
#define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53) /*!< \c Future use */
#define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54) /*!< \c Future use */
@ -1020,9 +1020,9 @@ typedef uint64_t rig_level_e;
#define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63) /*!< \c Future use */
//! @cond Doxygen_Suppress
#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_TEMP_METER)
#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_TEMP_METER|RIG_LEVEL_USB_AF|RIG_LEVEL_AGC_TIME)
#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER)
#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS)
#define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
#define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
@ -1182,9 +1182,9 @@ typedef uint64_t setting_t;
#define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42) /*!< \c TRANSCEIVE -- Send radio state changes automatically ON/OFF */
#define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43) /*!< \c SPECTRUM -- Spectrum scope data output ON/OFF */
#define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44) /*!< \c SPECTRUM_HOLD -- Pause spectrum scope updates ON/OFF */
#define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45) /*!< \c SEND_MORSE -- Send specified characters using CW */
#define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46) /*!< \c SEND_VOICE_MEM -- Transmit in SSB message stored in memory */
#define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45) /*!< \c SEND_MORSE -- Send specified characters using CW */
#define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46) /*!< \c SEND_VOICE_MEM -- Transmit in SSB message stored in memory */
#define RIG_FUNC_OVF_STATUS CONSTANT_64BIT_FLAG (47) /*!< \c OVF -- Read overflow status 0=Off, 1=On */
#define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c available for future RIG_FUNC items */
@ -1314,6 +1314,7 @@ typedef uint64_t rmode_t;
#define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c reserved for future expansion */
#define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c reserved for future expansion */
#define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63) /*!< \c last bit available for 64-bit enum MUST ALWAYS BE LAST, Max Count for dumpcaps.c */
#define RIG_MODE_ALL (0xffffffff) /*!< any mode constant */
#endif
/**
@ -1676,7 +1677,7 @@ typedef struct cal_table_float cal_table_float_t;
//! @cond Doxygen_Suppress
#define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t);
typedef int (* chan_cb_t)(RIG *, vfo_t vfo, channel_t **, int, const chan_t *, rig_ptr_t);
typedef int (* confval_cb_t)(RIG *,
const struct confparams *,
value_t *,
@ -2025,10 +2026,12 @@ struct rig_caps {
int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
int (*set_mem_all_cb)(RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t);
int (*get_mem_all_cb)(RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t);

Wyświetl plik

@ -325,7 +325,9 @@
#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)
#define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13)
#define ROT_ARRAYSOLUTIONS 7
#define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions"
#define ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1)
/**
* \brief A macro that returns the model number of the PCROTOR backend.
*

Wyświetl plik

@ -162,11 +162,20 @@ MainWindow::MainWindow(QWidget *parent)
}
//Light QFile darkStyleFile(":qdarkstyle/light/lightstyle.qss");
//Meter Peak hold
ui->progressBar_Smeter->setPeak(guiConf.peakHold);
QApplication::setWheelScrollLines(10); //Mouse wheel scroll step
//* Init
//Meter
ui->progressBar_Smeter->setTx(false);
ui->progressBar_Smeter->setMaxValue(100);
ui->progressBar_Smeter->setGateValue(80);
ui->progressBar_Smeter->setValue(-54);
ui->progressBar_Smeter->resetPeakValue();
ui->progressBar_Smeter->setPeakFactor(rigCom.rigRefresh/1000.0/2);
QApplication::setWheelScrollLines(10); //Mouse wheel scroll step
//VFO
ui->lineEdit_vfoMain->setValue(0);
ui->lineEdit_vfoSub->setValue(0);
}
MainWindow::~MainWindow()
@ -263,7 +272,9 @@ void MainWindow::guiInit()
ui->comboBox_AGC->addItem(rig_stragclevel(RIG_AGC_SLOW));
}
//* Meter comboBox
//* Meters & Sub-meter comboBox
//ui->progressBar_Smeter->setMaxValue(5); //FIXME tx_range_list
ui->progressBar_Smeter->setPeak(guiConf.peakHold);
ui->comboBox_Meter->clear();
if (rig_has_get_level(my_rig, RIG_METER_SWR)) ui->comboBox_Meter->addItem("SWR");
if (rig_has_get_level(my_rig, RIG_METER_ALC)) ui->comboBox_Meter->addItem("ALC");
@ -535,25 +546,33 @@ void MainWindow::guiUpdate()
if (rigGet.ptt == RIG_PTT_ON)
{
//ui->pushButton_PTT->setChecked(true);
if (rigGet.vfoTx == rigGet.vfoSub) ui->label_vfoSub->setStyleSheet("QLabel {background-color: red}");
else ui->label_vfoMain->setStyleSheet("QLabel {background-color: red}");
ui->progressBar_Smeter->setTx(true);
if (!ui->progressBar_Smeter->getTx())
{
ui->progressBar_Smeter->setTx(true);
ui->progressBar_Smeter->setValue(0);
ui->progressBar_Smeter->resetPeakValue();
}
ui->progressBar_Smeter->setValue(rigGet.powerMeter.f*100);
ui->progressBar_subMeter->setValue(rigGet.subMeter.f);
}
else //RIG_PTT_OFF
{
//ui->pushButton_PTT->setChecked(false);
if (rigGet.vfoTx == rigGet.vfoSub) ui->label_vfoSub->setStyleSheet("QLabel {}");
else ui->label_vfoMain->setStyleSheet("QLabel {}");
ui->progressBar_Smeter->setTx(false);
if (ui->progressBar_Smeter->getTx())
{
ui->progressBar_Smeter->setTx(false);
ui->progressBar_Smeter->setValue(-54);
ui->progressBar_Smeter->resetPeakValue();
if (rigSet.meter == RIG_LEVEL_SWR) ui->progressBar_subMeter->setValue(1.0);
else ui->progressBar_subMeter->setValue(0.0);
}
ui->progressBar_Smeter->setValue(rigGet.sMeter.i);
if (rigSet.meter == RIG_LEVEL_SWR) ui->progressBar_subMeter->setValue(1.0);
else ui->progressBar_subMeter->setValue(0.0);
}
//* Levels

Wyświetl plik

@ -38,8 +38,8 @@ SMeter::SMeter(QWidget *parent) : QWidget(parent)
meterTx = false;
currentValue = -54;
peakValue = currentValue;
currentValue = minValue;
peakValue = minValue;
peakFactor = 0.1;
peakHold = true;
@ -157,10 +157,6 @@ void SMeter::drawPeak(QPainter *painter)
QRect rect(initX - 2, height()/3+2+1, 2, height()/3-4-2);
painter->drawRect(rect);
//QPointF topPot = QPointF(initX, height()/3+2+1);
//QPointF bottomPot = QPointF(initX, height()*2/3-2-1);
//painter->drawLine(topPot, bottomPot);
painter->restore();
}
@ -319,7 +315,6 @@ void SMeter::drawScaleSMeter(QPainter *painter)
void SMeter::setMinValue(double value)
{
minValue = value;
update();
}
void SMeter::setMaxValue(double value)
@ -336,19 +331,16 @@ void SMeter::setGateValue(double value)
void SMeter::setLongStep(double value)
{
longStep = value;
update();
}
void SMeter::setShortStep(double value)
{
shortStep = value;
update();
}
void SMeter::setPrecision(int value)
{
precision = value;
update();
}
void SMeter::setBgColor(QColor color)
@ -374,7 +366,7 @@ void SMeter::setScaleColor(QColor color)
void SMeter::setValue(double value)
{
currentValue = value;
update();
update(1, height()/3+2+1, width()-14, height()/3-4-2);
}
void SMeter::setValue(int value)
@ -387,6 +379,11 @@ void SMeter::setTx(bool Tx)
meterTx = Tx;
}
bool SMeter::getTx()
{
return meterTx;
}
void SMeter::setPeak(bool Peak)
{
peakHold = Peak;
@ -396,3 +393,9 @@ void SMeter::setPeakFactor(double factor)
{
peakFactor = factor;
}
void SMeter::resetPeakValue()
{
if (meterTx) peakValue = minValue;
else peakValue = -54;
}

Wyświetl plik

@ -46,8 +46,10 @@ public slots:
void setValue(int value);
void setTx(bool Tx);
bool getTx();
void setPeak(bool Peak);
void setPeakFactor(double factor);
void resetPeakValue();
protected:
void paintEvent(QPaintEvent *);