Skip to content

Commit

Permalink
small corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
dl1ycf committed Oct 20, 2024
1 parent 670474b commit 6e87673
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ LIST OF RECENT PIHPSDR CHANGES
October 2024:
-------------

- RigCtl CAT "auto-reporting" now also reports changes of the
mode of VFO-A. Some logbook programs need this.

- Settings "stored with the mode": In the three groups
USB/LSB/DSB, CWU/CWL, and DIGU/DIGL, changes applied while
a mode in one of these groups is running apply to the other
modes in that group as well.

- Removed "CW ramp width" feature since we now have a good
ramp with a reasonable width.

Expand Down
5 changes: 3 additions & 2 deletions release/LatexManual/piHPSDR-Manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3211,8 +3211,9 @@ \section{The \texttt{RigCtl} (Rig control, or CAT) Menu}
the connection is put in ,,auto reporting'' mode. This mode can generally be enabled and disabled with the
ZZAI or AI CAT commands (see Appendix \ref{sec:catcommands}), but with this checkbox, the connection can be put
in auto reporting mode without the CAT client sending AI commands. In auto reporting mode, frequency changes
are transmitted via FA and FB CAT messages. The main use for auto reporting mode is, if a power amplifier
is connected via a serial line that needs frequency info via CAT. If you do not have hardware that depends
are transmitted via FA and FB CAT messages, and mode changes of VFO-A are transmitted via MD CAT commands.
The main use for auto reporting mode is, if a power amplifier or a logbook program
is connected via a serial line that needs frequency or mode info via CAT. If you do not have hardware that depends
on such unsolicited (without requesting them via ZZAI or AI commands) messages, this box should never be checked.

\rett{Enable RigCtl Debug Logging}. If enabled, the \pH CAT subsystem sends lots of debug messages to the standard output. If
Expand Down
4 changes: 2 additions & 2 deletions src/equalizer_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void equalizer_menu(GtkWidget *parent) {
case 1:
have_tenband = receiver[eqid]->eq_tenband;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_b), receiver[eqid]->eq_enable);
g_signal_connect(enable_b, "toggled", G_CALLBACK(enable_cb), GINT_TO_POINTER(0));
g_signal_connect(enable_b, "toggled", G_CALLBACK(enable_cb), NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tenband_b), receiver[eqid]->eq_tenband);
g_signal_connect(tenband_b, "toggled", G_CALLBACK(tenband_cb), GINT_TO_POINTER(0));

Expand All @@ -437,7 +437,7 @@ void equalizer_menu(GtkWidget *parent) {
case 2:
have_tenband = transmitter->eq_tenband;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_b), transmitter->eq_enable);
g_signal_connect(enable_b, "toggled", G_CALLBACK(enable_cb), GINT_TO_POINTER(0));
g_signal_connect(enable_b, "toggled", G_CALLBACK(enable_cb), NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tenband_b), transmitter->eq_tenband);
g_signal_connect(tenband_b, "toggled", G_CALLBACK(tenband_cb), GINT_TO_POINTER(0));

Expand Down
2 changes: 1 addition & 1 deletion src/ps_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ void ps_menu(GtkWidget *parent) {
col++;
GtkWidget *tol_b = gtk_check_button_new_with_label("PS Relax Tolerance");
gtk_widget_set_name(tol_b, "boldlabel");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tol_b), (transmitter->ps_ptol < 0.6));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tol_b), transmitter->ps_ptol);
gtk_grid_attach(GTK_GRID(grid), tol_b, col, row, 2, 1);
g_signal_connect(tol_b, "toggled", G_CALLBACK(tol_cb), NULL);
col++;
Expand Down
8 changes: 3 additions & 5 deletions src/transmitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void tx_save_state(const TRANSMITTER *tx) {
SetPropI1("transmitter.%d.ps_stbl", tx->id, tx->ps_stbl);
SetPropI1("transmitter.%d.ps_map", tx->id, tx->ps_map);
SetPropI1("transmitter.%d.ps_pin", tx->id, tx->ps_pin);
SetPropF1("transmitter.%d.ps_ptol", tx->id, tx->ps_ptol);
SetPropI1("transmitter.%d.ps_ptol", tx->id, tx->ps_ptol);
SetPropF1("transmitter.%d.ps_moxdelay", tx->id, tx->ps_moxdelay);
SetPropF1("transmitter.%d.ps_loopdelay", tx->id, tx->ps_loopdelay);
SetPropI1("transmitter.%d.attenuation", tx->id, tx->attenuation);
Expand Down Expand Up @@ -384,7 +384,7 @@ static void tx_restore_state(TRANSMITTER *tx) {
GetPropI1("transmitter.%d.ps_stbl", tx->id, tx->ps_stbl);
GetPropI1("transmitter.%d.ps_map", tx->id, tx->ps_map);
GetPropI1("transmitter.%d.ps_pin", tx->id, tx->ps_pin);
GetPropF1("transmitter.%d.ps_ptol", tx->id, tx->ps_ptol);
GetPropI1("transmitter.%d.ps_ptol", tx->id, tx->ps_ptol);
GetPropF1("transmitter.%d.ps_moxdelay", tx->id, tx->ps_moxdelay);
GetPropF1("transmitter.%d.ps_loopdelay", tx->id, tx->ps_loopdelay);
GetPropI1("transmitter.%d.attenuation", tx->id, tx->attenuation);
Expand Down Expand Up @@ -870,7 +870,7 @@ TRANSMITTER *tx_create_transmitter(int id, int width, int height) {
tx->ps_stbl = 0; // "Stbl" un-checked
tx->ps_map = 1; // "Map" checked
tx->ps_pin = 1; // "Pin" checked
tx->ps_ptol = 0.8; // "Relax Tolerance" un-checked
tx->ps_ptol = 0; // "Relax Tolerance" un-checked
tx->ps_moxdelay = 0.2; // "MOX Wait" 0.2 sec
tx->ps_loopdelay = 0.0; // "CAL Wait" 0.0 sec
tx->feedback = 0;
Expand Down Expand Up @@ -1885,9 +1885,7 @@ void tx_ps_setparams(const TRANSMITTER *tx) {
SetPSPtol(tx->id, tx->ps_ptol ? 0.4 : 0.8);
SetPSIntsAndSpi(tx->id, tx->ps_ints, tx->ps_spi);
SetPSStabilize(tx->id, tx->ps_stbl);
SetPSMapMode(tx->id, tx->ps_map);
SetPSPinMode(tx->id, tx->ps_pin);
SetPSPtol(tx->id, tx->ps_ptol);
SetPSMoxDelay(tx->id, tx->ps_moxdelay);
// Note that the TXDelay is internally stored in NanoSeconds
SetPSTXDelay(tx->id, 1E-9 * tx->ps_ampdelay);
Expand Down
2 changes: 1 addition & 1 deletion src/transmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ typedef struct _transmitter {
int ps_stbl;
int ps_map;
int ps_pin;
double ps_ptol;
int ps_ptol;
double ps_moxdelay;
double ps_loopdelay;
int ps_oneshot;
Expand Down
6 changes: 4 additions & 2 deletions src/tx_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ static void tune_drive_cb (GtkWidget *widget, gpointer data) {

static void digi_drive_cb (GtkWidget *widget, gpointer data) {
drive_digi_max = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget));
int mode = vfo_get_tx_mode();

if (transmitter->drive > drive_digi_max + 0.5) {
set_drive(drive_digi_max);
if ((mode == modeDIGL || mode == modeDIGU) && transmitter->drive > v + 0.5) {
set_drive(v);
}

}

static void swr_protection_cb (GtkWidget *widget, gpointer data) {
Expand Down

0 comments on commit 6e87673

Please sign in to comment.