summaryrefslogtreecommitdiff
path: root/map65/mainwindow.h
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /map65/mainwindow.h
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'map65/mainwindow.h')
-rw-r--r--map65/mainwindow.h194
1 files changed, 124 insertions, 70 deletions
diff --git a/map65/mainwindow.h b/map65/mainwindow.h
index 97d73b03..0262e0ac 100644
--- a/map65/mainwindow.h
+++ b/map65/mainwindow.h
@@ -8,17 +8,20 @@
#include <QDateTime>
#include <QHash>
#include <QProcess>
-#include "getfile.h"
#include "soundin.h"
#include "soundout.h"
#include "signalmeter.h"
#include "commons.h"
+#include "map65_decode_display_filter.h"
#include "sleep.h"
#include <QtConcurrent/QtConcurrent>
+#include <QByteArray>
-#define NFFT 32768
#define NSMAX 5760000
+
+struct StdoutChannel;
+
//--------------------------------------------------------------- MainWindow
namespace Ui {
class MainWindow;
@@ -29,6 +32,7 @@ class Astro;
class BandMap;
class Messages;
class WideGraph;
+extern QByteArray g_TxTuneGeometry;
class MainWindow : public QMainWindow
{
@@ -37,7 +41,69 @@ class MainWindow : public QMainWindow
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
+
+
+private:
+ Ui::MainWindow *ui;
+
+ struct DecoderContext;
+ DecoderContext* decoderCtx;
+
+public:
+ float* getDd() const;
+ std::thread stdoutReaderThread;
+ std::atomic<bool> stdoutReaderStop {false};
+ void writeSettings();
+
bool m_network;
+ int m_pttPortNumber = 0;
+
+ QString m_pttPath;
+ QString m_appDir;
+ QString m_installedDataDir;
+ QString m_dataDir;
+ QString m_eclipseFile;
+ QString m_settings_filename;
+ qint32 m_nDevIn;
+ qint32 m_nDevOut;
+ qint32 m_idInt;
+ qint32 m_astroFont;
+ qint32 m_timeout;
+ qint32 m_dPhi;
+ qint32 m_fCal;
+ qint32 m_paInDevice;
+ qint32 m_paOutDevice;
+ qint32 m_udpPort;
+ qint32 m_NBslider;
+ qint32 m_mult570;
+ qint32 m_mult570Tx;
+ qint32 m_dB;
+
+ double m_fAdd;
+ // double m_IQamp;
+ // double m_IQphase;
+ double m_cal570;
+ double m_TxOffset;
+
+ bool m_xpol;
+ bool m_xpolx;
+ int m_fs96000;
+ int m_pendingFs96000 {-1};
+ bool m_IQswap;
+ bool m_initIQplus;
+ bool m_bIQxt;
+ bool m_w3szUrl;
+ bool m_spot_to_psk_reporter;
+ bool m_psk_reporter_tcpip;
+
+ QString m_myCall;
+ QString m_myGrid;
+ QString m_saveDir;
+ QString m_azelDir;
+ QString m_dxccPfx;
+ QString m_colors;
+ QString m_editorCommand;
+ QString m_otherUrl;
public slots:
void showSoundInError(const QString& errorMsg);
@@ -46,19 +112,15 @@ public slots:
void diskDat();
void diskWriteFinished();
void freezeDecode(int n);
- void readFromStdout();
- void m65_error (QProcess::ProcessError);
void editor_error();
void guiUpdate();
void doubleClickOnCall(QString hiscall, bool ctrl);
void doubleClickOnMessages(QString hiscall, QString t2, bool ctrl);
-
-private:
- virtual void keyPressEvent (QKeyEvent *) override;
- virtual bool eventFilter (QObject *, QEvent *) override;
- virtual void closeEvent (QCloseEvent *) override;
-
+ void startDecoder();
+
private slots:
+ void onDiskDecodeFinished();
+ void onRunM65Finished();
void on_tx1_editingFinished();
void on_tx2_editingFinished();
void on_tx3_editingFinished();
@@ -81,6 +143,8 @@ private slots:
void on_actionQSG_Q65_triggered();
void on_actionQSG_MAP65_v3_triggered();
void on_actionQ65_Sensitivity_in_MAP65_3_0_triggered();
+ void on_actionCopyright_Notice_triggered();
+ void on_actionTrademark_Policy_triggered();
void on_actionWide_Waterfall_triggered();
void on_actionBand_Map_triggered();
void on_actionMessages_triggered();
@@ -96,6 +160,7 @@ private slots:
void on_actionNo_Deep_Search_triggered();
void on_actionNormal_Deep_Search_triggered();
void on_actionAggressive_Deep_Search_triggered();
+ void on_actionFull_Deep_Search_triggered();
void on_actionNone_triggered();
void on_actionSave_all_triggered();
void on_actionKeyboard_shortcuts_triggered();
@@ -143,34 +208,26 @@ private slots:
void on_actionQ65C_triggered();
void on_actionQ65D_triggered();
void on_actionQ65E_triggered();
-
void on_pbTxMode_clicked();
+ void onSampleRateChanged(int newRate);
private:
- Ui::MainWindow *ui;
- QString m_appDir;
- QString m_settings_filename;
+ QString call3Path() const;
+ virtual void keyPressEvent (QKeyEvent *) override;
+ virtual bool eventFilter (QObject *, QEvent *) override;
+ virtual void closeEvent (QCloseEvent *) override;
+
QScopedPointer<Astro> m_astro_window;
QScopedPointer<BandMap> m_band_map_window;
QPointer<Messages> m_messages_window;
- void createMessagesWindow();
- //QScopedPointer<Messages> m_messages_window;
QScopedPointer<WideGraph> m_wide_graph_window;
QPointer<QTimer> m_gui_timer;
qint64 m_msErase;
- qint32 m_nDevIn;
- qint32 m_nDevOut;
- qint32 m_idInt;
qint32 m_waterfallAvg;
qint32 m_DF;
qint32 m_tol;
qint32 m_QSOfreq0;
qint32 m_ntx;
- qint32 m_pttPort;
- qint32 m_astroFont;
- qint32 m_timeout;
- qint32 m_dPhi;
- qint32 m_fCal;
qint32 m_txFreq;
qint32 m_setftx;
qint32 m_ndepth;
@@ -180,27 +237,15 @@ private:
qint32 m_mode65;
qint32 m_nrx;
qint32 m_hsym0;
- qint32 m_paInDevice;
- qint32 m_paOutDevice;
- qint32 m_udpPort;
- qint32 m_NBslider;
qint32 m_adjustIQ;
qint32 m_applyIQcal;
- qint32 m_mult570;
- qint32 m_mult570Tx;
qint32 m_nsum;
qint32 m_nsave;
qint32 m_TRperiod;
qint32 m_modeJT65;
qint32 m_modeQ65;
qint32 m_RxState;
- qint32 m_dB;
- double m_fAdd;
- // double m_IQamp;
- // double m_IQphase;
- double m_cal570;
- double m_TxOffset;
double m_xavg;
bool m_monitoring;
@@ -212,28 +257,41 @@ private:
bool m_auto;
bool m_txMute;
bool m_restart;
- bool m_xpol;
- bool m_xpolx;
bool m_call3Modified;
- bool m_startAnother;
bool m_saveAll;
bool m_onlyEME;
bool m_widebandDecode;
bool m_kb8rq;
bool m_NB;
- bool m_fs96000;
- bool m_IQswap;
- bool m_initIQplus;
- bool m_bIQxt;
+ bool m_pttErrorShown = false;
+ QString m_path;
+ QString m_pbdecoding_style1;
+ QString m_pbmonitor_style;
+ QString m_pbAutoOn_style;
+ QString m_messagesText;
+ QString m_bandmapText;
+ Map65DecodeDisplayFilter m_decodeDisplayFilter;
+ QString m_hisCall;
+ QString m_hisGrid;
+ QString m_palette;
+ QString m_dateTime;
+ QString m_mode;
+ QString m_modeTx;
+
float m_gainx;
float m_gainy;
float m_phasex;
float m_phasey;
float m_pctZap;
-
QRect m_wideGraphGeom;
+ int ddSize = 0;
+ // --- Minute-boundary tracking for symspec ---
+ int ntr0 = -1; // previous ntr value (seconds into TR period)
+ int m_TRperiod0 = 0; // previous TR period (usually 60)
+ int nhsym0 = 0; // ihsym at start of minute (reset when newmin=1)
+
QLabel* lab1; // labels in status bar
QLabel* lab2;
QLabel* lab3;
@@ -241,6 +299,7 @@ private:
QLabel* lab5;
QLabel* lab6;
QLabel* lab7;
+ QLabel* lab8;
QMessageBox msgBox0;
@@ -253,39 +312,27 @@ private:
QProcess proc_qthid;
QProcess proc_editor;
-
- QString m_path;
- QString m_pbdecoding_style1;
- QString m_pbmonitor_style;
- QString m_pbAutoOn_style;
- QString m_messagesText;
- QString m_bandmapText;
- QString m_myCall;
- QString m_myGrid;
- QString m_hisCall;
- QString m_hisGrid;
- QString m_saveDir;
- QString m_azelDir;
- QString m_dxccPfx;
- QString m_palette;
- QString m_dateTime;
- QString m_mode;
- QString m_colors;
- QString m_editorCommand;
- QString m_modeTx;
+ double fcenter = 0.0;
+ char mycall[12] = {};
+ char mygrid[6] = {};
+ char hiscall[12] = {};
+ char hisgrid[6] = {};
+ char datetime[17] = {};
QHash<QString,bool> m_worked;
SignalMeter *xSignalMeter;
SignalMeter *ySignalMeter;
-
SoundInThread soundInThread; //Instantiate the audio threads
SoundOutThread soundOutThread;
+ QTimer* m_decodeIdleTimer = nullptr;
+ int m_decodeIdleTimeoutMs = 2500; // tweak 150–300 as needed
+ int m_decodeFinishedCount = 0;
+
//---------------------------------------------------- private functions
void readSettings();
- void writeSettings();
void createStatusBar();
void updateStatusBar();
void msgBox(QString t);
@@ -297,11 +344,18 @@ private:
bool isGrid4(QString g);
bool subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
void read_log();
+ void writeCrashData();
+ void savetf2(QString fname, bool xpol);
+ void getfile(QString fname, bool m_xpol, int dbDgrd);
+ void processStdOut(QString text);
+ void startSharedMemoryStdoutReader(DecoderContext* ctx);
+ void createMessagesWindow();
};
-extern void getfile(QString fname, bool xpol, int idInt);
-extern void savetf2(QString fname, bool xpol);
-extern int killbyname(const char* progName);
+extern int g_sampleRate;
+extern int active_nfft;
+extern std::vector<qint16> id;
+
extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
int minChan[], int maxChan[],
int minSpeed[], int maxSpeed[]);
@@ -309,7 +363,7 @@ extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
extern "C" {
//----------------------------------------------------- C and Fortran routines
void symspec_(int* k, int* nxpol, int* ndiskdat, int* nb,
- int* m_NBslider, int* idphi, int* nfsample, float* fgreen,
+ int* m_NBslider, int* idphi,
int* iqadjust, int* iqapply, float* gainx, float* gainy,
float* phasex, float* phasey, float* rejectx, float* rejecty,
float* px, float* py, float s[], int* nkhz, int* nhsym,