kopia lustrzana https://github.com/PianetaRadio/CatRadio
Porównaj commity
5 Commity
0fdc71f98d
...
8fb790c1eb
Autor | SHA1 | Data |
---|---|---|
PianetaRadio | 8fb790c1eb | |
PianetaRadio | 8fa52c8273 | |
PianetaRadio | f51d68fc0e | |
PianetaRadio | 29682cbad5 | |
PianetaRadio | 882558b523 |
|
@ -3,7 +3,9 @@ CatRadio
|
|||
(+ New, * Updated, - Removed)
|
||||
|
||||
1.4.1 - 2024-xx-xx
|
||||
+ CW memory keyer
|
||||
+ Check hamlib version on startup
|
||||
* Bug fix: IF shift
|
||||
|
||||
1.4.0 - 2024-03-17
|
||||
+ Auto Connect option
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <cwchar>
|
||||
#include <rig.h> //Hamlib
|
||||
|
@ -1079,6 +1078,32 @@ void MainWindow::on_pushButton_BandUp_clicked()
|
|||
rigCmd.bandUp = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_CW1_clicked()
|
||||
{
|
||||
send_cw_mem(1);
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_CW2_clicked()
|
||||
{
|
||||
send_cw_mem(2);
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_CW3_clicked()
|
||||
{
|
||||
send_cw_mem(3);
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_CW4_clicked()
|
||||
{
|
||||
send_cw_mem(4);
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_CW5_clicked()
|
||||
{
|
||||
send_cw_mem(5);
|
||||
}
|
||||
|
||||
|
||||
//***** CheckBox *****
|
||||
void MainWindow::on_checkBox_micCompressor_toggled(bool checked)
|
||||
{
|
||||
|
|
12
mainwindow.h
12
mainwindow.h
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
** This file is part of the CatRadio project.
|
||||
** Copyright 2022 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
** Copyright 2022-2024 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -212,6 +212,16 @@ private slots:
|
|||
|
||||
void on_action_AboutDarkTheme_triggered();
|
||||
|
||||
void on_pushButton_CW1_clicked();
|
||||
|
||||
void on_pushButton_CW2_clicked();
|
||||
|
||||
void on_pushButton_CW3_clicked();
|
||||
|
||||
void on_pushButton_CW4_clicked();
|
||||
|
||||
void on_pushButton_CW5_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
QTimer *timer;
|
||||
|
|
108
mainwindow.ui
108
mainwindow.ui
|
@ -1765,7 +1765,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_clar">
|
||||
<property name="autoFillBackground">
|
||||
|
@ -1887,6 +1887,49 @@
|
|||
<string>CW</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_CW2">
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QSpinBox" name="spinBox_WPM">
|
||||
<property name="minimum">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="pushButton_CW4">
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButton_CW3">
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_BKIN">
|
||||
<property name="toolTip">
|
||||
|
@ -1898,30 +1941,36 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_WPM">
|
||||
<property name="text">
|
||||
<string>WPM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_WPM">
|
||||
<property name="minimum">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QLabel" name="label_WPM">
|
||||
<property name="text">
|
||||
<string>WPM</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_CW1">
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QPushButton" name="pushButton_CW5">
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QCheckBox" name="checkBox_APF">
|
||||
<property name="toolTip">
|
||||
<string>Audio Peak Filter</string>
|
||||
|
@ -1931,6 +1980,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_FM">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
** This file is part of the CatRadio project.
|
||||
** Copyright 2022 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
** Copyright 2022-2024 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -29,6 +29,7 @@ extern rigSettings rigSet;
|
|||
extern rigCommand rigCmd;
|
||||
extern rigCommand rigCap;
|
||||
|
||||
//* Set band to default frequency or use band change if radio has capability
|
||||
void set_band (int band)
|
||||
{
|
||||
if (rigCap.bandChange==0)
|
||||
|
@ -84,6 +85,7 @@ void set_band (int band)
|
|||
}
|
||||
}
|
||||
|
||||
//* Set split to 5kHz and activate it
|
||||
void quick_split ()
|
||||
{
|
||||
rigSet.freqSub = rigGet.freqMain + 5000;
|
||||
|
@ -94,6 +96,14 @@ void quick_split ()
|
|||
rigCmd.split = 1;
|
||||
}
|
||||
|
||||
//* Send CW keyer message 1-5
|
||||
void send_cw_mem (int memory)
|
||||
{
|
||||
rigSet.cwMem = (char)(memory + '0');
|
||||
rigCmd.cwSend = 1;
|
||||
}
|
||||
|
||||
//* Convert AGC int value to hamlib enumerated
|
||||
agc_level_e levelagcvalue (int agcValue)
|
||||
{
|
||||
agc_level_e agcLevel;
|
||||
|
@ -113,6 +123,7 @@ agc_level_e levelagcvalue (int agcValue)
|
|||
return agcLevel;
|
||||
}
|
||||
|
||||
//* Convert AGC string to hamlib enumerated
|
||||
agc_level_e levelagcstr (QString agcString)
|
||||
{
|
||||
agc_level_e agcLevel;
|
||||
|
@ -128,6 +139,7 @@ agc_level_e levelagcstr (QString agcString)
|
|||
return agcLevel;
|
||||
}
|
||||
|
||||
//* Convert AGC hamlib enumerated to hamlib value_t
|
||||
value_t valueagclevel (agc_level_e agcLevel)
|
||||
{
|
||||
value_t value;
|
||||
|
@ -143,6 +155,7 @@ value_t valueagclevel (agc_level_e agcLevel)
|
|||
return value;
|
||||
}
|
||||
|
||||
//* Convert antenna string to hamlib ant_t
|
||||
ant_t antstr (QString antString)
|
||||
{
|
||||
ant_t ant;
|
||||
|
@ -160,6 +173,7 @@ ant_t antstr (QString antString)
|
|||
return ant;
|
||||
}
|
||||
|
||||
//* Convert Submeter combo box string into hamlib RIG_LEVEL constant
|
||||
unsigned long long levelmeterstr (QString meterString)
|
||||
{
|
||||
unsigned long long levelMeter;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
** This file is part of the CatRadio project.
|
||||
** Copyright 2022 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
** Copyright 2022-2024 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -29,8 +29,9 @@
|
|||
|
||||
void set_band (int band);
|
||||
void quick_split ();
|
||||
void send_cw_mem (int memory);
|
||||
agc_level_e levelagcvalue (int agcValue);
|
||||
agc_level_e levelagcstr (QString agcString);
|
||||
value_t valueagclevel (agc_level_e agcLevel);
|
||||
ant_t antstr (QString antString);
|
||||
unsigned long long levelmeterstr (QString meterString); //Convert Submeter combo box string into Hamlib RIG_LEVEL constant
|
||||
unsigned long long levelmeterstr (QString meterString);
|
||||
|
|
|
@ -116,6 +116,14 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
rigCmd.ptt = 0;
|
||||
}
|
||||
|
||||
if (rigCmd.cwSend && (rigGet.mode == RIG_MODE_CW || rigGet.mode == RIG_MODE_CWN || rigGet.mode == RIG_MODE_CWR))
|
||||
{
|
||||
//if (rig_has_get_func(my_rig, RIG_FUNCTION_SEND_MORSE)) rig_send_morse(my_rig, RIG_VFO_CURR, &rigSet.cwMem);
|
||||
retcode = rig_send_morse(my_rig, RIG_VFO_CURR, &rigSet.cwMem);
|
||||
if (retcode == RIG_OK) rigGet.ptt = RIG_PTT_ON; //assume PPT on if send_morse is ok
|
||||
rigCmd.cwSend = 0;
|
||||
}
|
||||
|
||||
//* VFO
|
||||
if (rigCmd.freqMain) //VFO Main
|
||||
{
|
||||
|
@ -135,6 +143,12 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
//***** Priority Poll execution *****
|
||||
else
|
||||
{
|
||||
//* PTT
|
||||
ptt_t retptt;
|
||||
retcode = rig_get_ptt(my_rig, RIG_VFO_CURR, &retptt);
|
||||
if (retcode == RIG_OK) rigGet.ptt = retptt;
|
||||
|
||||
//* VFO
|
||||
freq_t retfreq;
|
||||
retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &retfreq); //get VFO Main
|
||||
if (retcode == RIG_OK) rigGet.freqMain = retfreq;
|
||||
|
@ -144,11 +158,6 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
if (retcode == RIG_OK) rigGet.freqSub = retfreq;
|
||||
}
|
||||
|
||||
//* PTT
|
||||
ptt_t retptt;
|
||||
retcode = rig_get_ptt(my_rig, RIG_VFO_CURR, &retptt);
|
||||
if (retcode == RIG_OK) rigGet.ptt = retptt;
|
||||
|
||||
//* Meter
|
||||
if (rigGet.ptt == 1 || rigSet.ptt == 1)
|
||||
{
|
||||
|
@ -793,7 +802,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
//* IF Shift
|
||||
if ((indexCmd == 17 && !rigGet.ptt && rigCom.fullPoll) || indexCmd == 0)
|
||||
{
|
||||
if (rig_has_get_level(my_rig, RIG_LEVEL_NR))
|
||||
if (rig_has_get_level(my_rig, RIG_LEVEL_IF))
|
||||
{
|
||||
rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_IF, &retvalue);
|
||||
rigGet.ifShift = retvalue.i;
|
||||
|
@ -813,7 +822,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
}
|
||||
|
||||
//* CW
|
||||
if ((indexCmd == 19 && !rigGet.ptt && rigCom.fullPoll) || indexCmd == 0) //&& mode=CW
|
||||
if ((indexCmd == 19 && !rigGet.ptt && rigCom.fullPoll && (rigGet.mode == RIG_MODE_CW || rigGet.mode == RIG_MODE_CWN || rigGet.mode == RIG_MODE_CWR)) || indexCmd == 0)
|
||||
{
|
||||
if (rig_has_get_func(my_rig, RIG_FUNC_FBKIN)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_FBKIN, &rigGet.bkin); //Break-in
|
||||
if (rig_has_get_func(my_rig, RIG_FUNC_APF)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_APF, &rigGet.apf); //Audio Peak Filter
|
||||
|
@ -822,7 +831,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
}
|
||||
|
||||
//* FM
|
||||
if ((indexCmd == 20 && !rigGet.ptt && rigCom.fullPoll) || indexCmd == 0) //&& mode=FM
|
||||
if ((indexCmd == 20 && !rigGet.ptt && rigCom.fullPoll && (rigGet.mode == RIG_MODE_FM || rigGet.mode == RIG_MODE_WFM || rigGet.mode == RIG_MODE_FMN)) || indexCmd == 0)
|
||||
{
|
||||
rig_get_rptr_shift(my_rig, RIG_VFO_CURR, &rigGet.rptShift); //Repeater Shift
|
||||
rig_get_rptr_offs(my_rig, RIG_VFO_CURR, &rigGet.rptOffset); //Repeater Offset
|
||||
|
|
|
@ -71,6 +71,7 @@ typedef struct {
|
|||
int tuner; //Tuner
|
||||
int bkin; //CW Break-in
|
||||
int wpm; //CW Keyer speed WPM
|
||||
char cwMem; //CW memory keyer
|
||||
int apf; //Audio Peak Filter
|
||||
int noiseBlanker, noiseBlanker2; //NB
|
||||
int noiseReduction; //NR
|
||||
|
@ -109,9 +110,10 @@ typedef struct {
|
|||
int tune;
|
||||
int bandUp, bandDown;
|
||||
int bandChange;
|
||||
int bkin;
|
||||
int wpm;
|
||||
int apf;
|
||||
int bkin; //CW break-in
|
||||
int wpm; //CW wpm
|
||||
int cwSend; //CW send memory (Yaesu only)
|
||||
int apf; //CW audio peak filter (Yaesu only)
|
||||
int noiseBlanker, noiseBlanker2;
|
||||
int noiseReduction, noiseReductionLevel;
|
||||
int notchFilter;
|
||||
|
|
Ładowanie…
Reference in New Issue