added 'Radio Connected' announcement

pull/14/head
Tom Early 6 years ago
parent 2e929c9e5a
commit 9f0ca11806

@ -45,7 +45,7 @@
#include "QnetConfigure.h" #include "QnetConfigure.h"
#include "Timer.h" #include "Timer.h"
#define ITAP_VERSION "QnetITAP-2.1.1" #define ITAP_VERSION "QnetITAP-2.1.2"
std::atomic<bool> CQnetITAP::keep_running(true); std::atomic<bool> CQnetITAP::keep_running(true);
@ -275,6 +275,16 @@ void CQnetITAP::Run(const char *cfgfile)
if (! is_alive) { if (! is_alive) {
printf("Icom Radio is connected.\n"); printf("Icom Radio is connected.\n");
is_alive = true; is_alive = true;
struct stat sbuf;
if (stat(FILE_QNVOICE_FILE.c_str(), &sbuf)) {
// yes, there is no FILE_QNVOICE_FILE, so create it
FILE *fp = fopen(FILE_QNVOICE_FILE.c_str(), "w");
if (fp) {
fprintf(fp, "%c_radio_connected.dat_WELCOME_TO_QUADNET", RPTR_MOD);
fclose(fp);
} else
fprintf(stderr, "could not open %s\n", FILE_QNVOICE_FILE.c_str());
}
} }
break; break;
default: default:
@ -538,6 +548,7 @@ bool CQnetITAP::ReadConfig(const char *cfgFile)
} }
cfg.GetValue("log_qso", estr, log_qso); cfg.GetValue("log_qso", estr, log_qso);
cfg.GetValue("file_qnvoice_file", estr, FILE_QNVOICE_FILE, 2, FILENAME_MAX);
return false; return false;
} }

@ -126,6 +126,7 @@ private:
// config data // config data
char RPTR_MOD; char RPTR_MOD;
std::string ITAP_DEVICE, RPTR; std::string ITAP_DEVICE, RPTR;
std::string FILE_QNVOICE_FILE;
bool log_qso; bool log_qso;
// parameters // parameters

Binary file not shown.
Loading…
Cancel
Save

Powered by TurnKey Linux.