Produce a warning message if the WSPR .c2 file cannot be written

Thanks to Mike W9MDB for this patch.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7039 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2016-08-29 17:01:38 +00:00
parent 7281664990
commit 81ad76cacc
2 changed files with 11 additions and 9 deletions
+3 -2
View File
@@ -102,7 +102,7 @@ extern "C" {
int ptt_(int nport, int ntx, int* iptt, int* nopen);
void wspr_downsample_(short int d2[], int* k);
void savec2_(char* fname, int* TR_seconds, double* dial_freq, int len1);
int savec2_(char* fname, int* TR_seconds, double* dial_freq, int len1);
void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
float* level, float* sigdb, float* snr, float* dfreq,
@@ -1177,7 +1177,8 @@ void MainWindow::dataSink(qint64 frames)
int nsec=120;
int nbfo=1500;
double f0m1500=m_freqNominal/1000000.0 + nbfo - 1500;
savec2_(c2name,&nsec,&f0m1500,len1);
int err = savec2_(c2name,&nsec,&f0m1500,len1);
if (err!=0) MessageBox::warning_message (this, tr ("Error saving c2 file"), c2name);
}
}