diff --git a/Config.cpp b/Config.cpp
index ad03176..f660aaa 100644
--- a/Config.cpp
+++ b/Config.cpp
@@ -54,6 +54,7 @@ extern int CWIDLeft;
extern int CWIDRight;
extern int CWIDType;
extern bool afterTraffic;
+extern bool darkTheme;
extern "C" int RSID_SABM[4];
extern "C" int RSID_UI[4];
@@ -115,6 +116,7 @@ void GetPortSettings(int Chan)
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
il2p_mode[Chan] = getAX25Param("IL2P", IL2P_MODE_NONE).toInt();
+ il2p_crc[Chan] = getAX25Param("IL2PCRC", 0).toInt();
RSID_UI[Chan] = getAX25Param("RSID_UI", 0).toInt();
RSID_SABM[Chan] = getAX25Param("RSID_SABM", 0).toInt();
RSID_SetModem[Chan] = getAX25Param("RSID_SetModem", 0).toInt();
@@ -303,6 +305,8 @@ void getSettings()
}
+ darkTheme = settings->value("Init/darkTheme", false).toBool();
+
delete(settings);
}
@@ -347,6 +351,7 @@ void SavePortSettings(int Chan)
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
saveAX25Param("FX25", fx25_mode[Chan]);
saveAX25Param("IL2P", il2p_mode[Chan]);
+ saveAX25Param("IL2PCRC", il2p_crc[Chan]);
saveAX25Param("RSID_UI", RSID_UI[Chan]);
saveAX25Param("RSID_SABM", RSID_SABM[Chan]);
saveAX25Param("RSID_SetModem", RSID_SetModem[Chan]);
@@ -463,6 +468,8 @@ void saveSettings()
settings->setValue("Modem/CWIDType", CWIDType);
settings->setValue("Modem/afterTraffic", afterTraffic);
+ settings->setValue("Init/darkTheme", darkTheme);
+
saveAX25Params(0);
saveAX25Params(1);
saveAX25Params(2);
diff --git a/ModemDialog.ui b/ModemDialog.ui
index e8f7903..9b5b856 100644
--- a/ModemDialog.ui
+++ b/ModemDialog.ui
@@ -737,6 +737,19 @@
Retries
+
+
+
+ 200
+ 280
+ 53
+ 21
+
+
+
+ CRC
+
+
@@ -1445,6 +1458,19 @@
+
+
+
+ 200
+ 280
+ 53
+ 21
+
+
+
+ CRC
+
+
@@ -2202,6 +2228,19 @@
+
+
+
+ 200
+ 280
+ 53
+ 21
+
+
+
+ CRC
+
+
@@ -2956,6 +2995,19 @@
+
+
+
+ 200
+ 280
+ 53
+ 21
+
+
+
+ CRC
+
+
@@ -3041,6 +3093,9 @@
Save
+
+ true
+
-
diff --git a/QtSoundModem-DESKTOP-MHE5LO8.vcxproj b/QtSoundModem-DESKTOP-MHE5LO8.vcxproj
deleted file mode 100644
index adcd4b6..0000000
--- a/QtSoundModem-DESKTOP-MHE5LO8.vcxproj
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Debug
- Win32
-
-
-
- {4EDE958E-D0AC-37B4-81F7-78313A262DCD}
- QtSoundModem
- QtVS_v304
- 10.0.17763.0
- 10.0.19041.0
- $(MSBuildProjectDirectory)\QtMsBuild
-
-
-
- v141
- release\
- false
- NotSet
- Application
- release\
- QtSoundModem
-
-
- v141
- debug\
- false
- NotSet
- Application
- debug\
- QtSoundModem
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(SolutionDir)Intermed\$(Platform)\$(Configuration)\
- QtSoundModem
- true
- true
-
-
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(SolutionDir)Intermed\$(Platform)\$(Configuration)\\
- QtSoundModem
- true
- false
-
-
- 5.14
- core;network;gui;widgets;serialport
-
-
- 5.14.2
- core;network;gui;widgets;serialport
-
-
-
-
-
-
- rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)
- -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)
- $(IntDir)
- false
- None
- 4577;4467;%(DisableSpecificWarnings)
- Sync
- $(IntDir)
- MaxSpeed
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)
- false
- $(OutDir)
- MultiThreadedDLL
- true
- true
- Level3
- true
-
-
- libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)
- C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)
- "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)
- true
- false
- true
- false
- true
- $(OutDir)QtSoundModem.exe
- true
- Windows
- true
-
-
- Unsigned
- None
- 0
-
-
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)
-
-
- msvc
- ./$(Configuration)/moc_predefs.h
- Moc'ing %(Identity)...
- output
- $(IntDir)
- moc_%(Filename).cpp
-
-
- QtSoundModem
- default
- Rcc'ing %(Identity)...
- $(IntDir)
- qrc_%(Filename).cpp
-
-
- Uic'ing %(Identity)...
- $(IntDir)
- ui_%(Filename).h
-
-
-
-
- .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)
- -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)
- $(IntDir)
- false
- EditAndContinue
- 4577;4467;%(DisableSpecificWarnings)
- Sync
- $(IntDir)
- Disabled
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)
- false
- MultiThreadedDebugDLL
- true
- true
- Level3
- true
- $(OutDir)
-
-
- libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)
- C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)
- "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)
- true
- true
- true
- $(OutDir)\QtSoundModem.exe
- true
- Windows
- true
- false
-
-
- Unsigned
- None
- 0
-
-
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)
-
-
- msvc
- ./$(Configuration)/moc_predefs.h
- Moc'ing %(Identity)...
- output
- $(IntDir)
- moc_%(Filename).cpp
-
-
- QtSoundModem
- default
- Rcc'ing %(Identity)...
- $(IntDir)
- qrc_%(Filename).cpp
-
-
- Uic'ing %(Identity)...
- $(IntDir)
- ui_%(Filename).h
-
-
-
-
-
-
-
-
-
- CompileAsC
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Document
- true
- $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)
- cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h
- Generate moc_predefs.h
- debug\moc_predefs.h;%(Outputs)
-
-
- Document
- $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)
- cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h
- Generate moc_predefs.h
- release\moc_predefs.h;%(Outputs)
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/QtSoundModem-HPLaptop.vcxproj b/QtSoundModem-HPLaptop.vcxproj
deleted file mode 100644
index 3b99dd0..0000000
--- a/QtSoundModem-HPLaptop.vcxproj
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Debug
- Win32
-
-
-
- {4EDE958E-D0AC-37B4-81F7-78313A262DCD}
- QtSoundModem
- QtVS_v304
- 10.0.19041.0
- 10.0.19041.0
- $(MSBuildProjectDirectory)\QtMsBuild
-
-
-
- v141
- release\
- false
- NotSet
- Application
- release\
- QtSoundModem
-
-
- v141
- debug\
- false
- NotSet
- Application
- debug\
- QtSoundModem
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Debug\
- C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Debug\
- QtSoundModem
- true
- true
-
-
- C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Release\
- C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Release\
- QtSoundModem
- true
- false
-
-
- 5.14.2_msvc2017
- core;network;gui;widgets;serialport
-
-
- 5.14.2_msvc2017
- core;network;gui;widgets;serialport
-
-
-
-
-
-
- rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)
- -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)
- $(IntDir)
- false
- None
- 4577;4467;%(DisableSpecificWarnings)
- Sync
- $(IntDir)
- MaxSpeed
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)
- false
- $(OutDir)
- MultiThreadedDLL
- true
- true
- Level3
- true
-
-
- libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)
- C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)
- "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)
- true
- false
- true
- false
- true
- $(OutDir)\QtSoundModem.exe
- true
- Windows
- true
-
-
- Unsigned
- None
- 0
-
-
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)
-
-
- msvc
- ./$(Configuration)/moc_predefs.h
- Moc'ing %(Identity)...
- output
- $(IntDir)
- moc_%(Filename).cpp
-
-
- QtSoundModem
- default
- Rcc'ing %(Identity)...
- $(IntDir)
- qrc_%(Filename).cpp
-
-
- Uic'ing %(Identity)...
- $(IntDir)
- ui_%(Filename).h
-
-
-
-
- .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)
- -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)
- $(IntDir)
- false
- EditAndContinue
- 4577;4467;%(DisableSpecificWarnings)
- Sync
- $(IntDir)
- Disabled
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)
- false
- MultiThreadedDebugDLL
- true
- true
- Level3
- true
- $(OutDir)
-
-
- libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)
- C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)
- "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)
- true
- true
- true
- $(OutDir)\QtSoundModem.exe
- true
- Windows
- true
- false
-
-
- Unsigned
- None
- 0
-
-
- _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)
-
-
- msvc
- ./$(Configuration)/moc_predefs.h
- Moc'ing %(Identity)...
- output
- $(IntDir)
- moc_%(Filename).cpp
-
-
- QtSoundModem
- default
- Rcc'ing %(Identity)...
- $(IntDir)
- qrc_%(Filename).cpp
-
-
- Uic'ing %(Identity)...
- $(IntDir)
- ui_%(Filename).h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Document
- true
- $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)
- cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h
- Generate moc_predefs.h
- debug\moc_predefs.h;%(Outputs)
-
-
- Document
- $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)
- cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h
- Generate moc_predefs.h
- release\moc_predefs.h;%(Outputs)
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/QtSoundModem.cpp b/QtSoundModem.cpp
index cadb3fb..976ca95 100644
--- a/QtSoundModem.cpp
+++ b/QtSoundModem.cpp
@@ -51,17 +51,18 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
QImage *Constellation[4];
-QImage *Waterfall[4] = { 0,0,0,0 };
-QImage *Header[4];
+QImage *Waterfall = 0;
QLabel *DCDLabel[4];
QLineEdit *chanOffsetLabel[4];
QImage *DCDLed[4];
QImage *RXLevel;
+QImage *RXLevel2;
+
+QLabel *WaterfallCopy;
-QLabel *WaterfallCopy[2];
-QLabel *HeaderCopy[2];
QLabel * RXLevelCopy;
+QLabel * RXLevel2Copy;
QTextEdit * monWindowCopy;
@@ -73,6 +74,8 @@ QList Ports = QSerialPortInfo::availablePorts();
void saveSettings();
void getSettings();
+void DrawModemFreqRange();
+
extern "C" void CloseSound();
extern "C" void GetSoundDevices();
extern "C" char modes_name[modes_count][21];
@@ -120,11 +123,10 @@ extern "C"
int Freq_Change(int Chan, int Freq);
void set_speed(int snd_ch, int Modem);
void init_speed(int snd_ch);
- void wf_pointer(int snd_ch);
void FourierTransform(int NumSamples, short * RealIn, float * RealOut, float * ImagOut, int InverseTransform);
void dofft(short * in, float * outr, float * outi);
void init_raduga();
- void wf_Scale(int Chan);
+ void DrawFreqTicks();
void AGW_Report_Modem_Change(int port);
char * strlop(char * buf, char delim);
void sendRSID(int Chan, int dropTX);
@@ -157,7 +159,10 @@ int WaterfallMin = 00;
int WaterfallMax = 6000;
int Configuring = 0;
+bool lockWaterfall = false;
+bool inWaterfall = false;
+extern "C" int NeedWaterfallHeaders;
extern "C" float BinSize;
extern "C" { int RSID_SABM[4]; }
@@ -175,6 +180,12 @@ QRgb red = qRgb(255, 0, 0);
QRgb yellow = qRgb(255, 255, 0);
QRgb cyan = qRgb(0, 255, 255);
+QRgb txText = qRgb(192, 0, 0);
+QRgb rxText = qRgb(0, 0, 192);
+
+bool darkTheme = true;
+bool minimizeonStart = true;
+
// Indexed colour list from ARDOPC
#define WHITE 0
@@ -198,7 +209,7 @@ QRgb vbColours[16] = { qRgb(255, 255, 255), qRgb(255, 99, 71), qRgb(255, 215, 0)
qRgb(218, 165, 32), qRgb(255, 0, 255) };
unsigned char WaterfallLines[2][80][4096] = { 0 };
-int NextWaterfallLine[2] = { 0 };
+int NextWaterfallLine[2] = {0, 0};
unsigned int LastLevel = 255;
unsigned int LastBusy = 255;
@@ -307,8 +318,20 @@ void QtSoundModem::resizeEvent(QResizeEvent* event)
QRect r = geometry();
- int A, B, C, W;
- int modemBoxHeight = 30;
+ QRect r1 = ui.monWindow->geometry();
+ QRect r2 = ui.centralWidget->geometry();
+
+ int modemBoxHeight = 34;
+
+ int Width = r.width();
+ int Height = r.height() - 25;
+
+ int monitorTop;
+ int monitorHeight;
+ int sessionTop;
+ int sessionHeight = 0;
+ int waterfallsTop;
+ int waterfallsHeight = WaterfallImageHeight;
ui.modeB->setVisible(soundChannel[1]);
ui.centerB->setVisible(soundChannel[1]);
@@ -331,78 +354,46 @@ void QtSoundModem::resizeEvent(QResizeEvent* event)
if (soundChannel[2] || soundChannel[3])
modemBoxHeight = 60;
+ ui.Waterfall->setVisible(0);
- A = r.height() - 25; // No waterfalls
+ monitorTop = modemBoxHeight + 1;
- if (UsingBothChannels && Secondwaterfall)
+ // Now have one waterfall label containing headers and waterfalls
+
+ if (Firstwaterfall || Secondwaterfall)
+ ui.Waterfall->setVisible(1);
+
+ if (AGWServ)
{
- // Two waterfalls
-
- ui.WaterfallA->setVisible(1);
- ui.HeaderA->setVisible(1);
- ui.WaterfallB->setVisible(1);
- ui.HeaderB->setVisible(1);
-
- A = r.height() - 258; // Top of Waterfall A
- B = A + 115; // Top of Waterfall B
+ sessionTable->setVisible(true);
+ sessionHeight = 150;
}
else
{
- // One waterfall
-
- // Could be Left or Right
-
- if (Firstwaterfall)
- {
- if (soundChannel[0] == RIGHT)
- {
- ui.WaterfallA->setVisible(0);
- ui.HeaderA->setVisible(0);
- ui.WaterfallB->setVisible(1);
- ui.HeaderB->setVisible(1);
- }
- else
- {
- ui.WaterfallA->setVisible(1);
- ui.HeaderA->setVisible(1);
- ui.WaterfallB->setVisible(0);
- ui.HeaderB->setVisible(0);
- }
-
- A = r.height() - 145; // Top of Waterfall A
- }
- else
- A = r.height() - 25; // Top of Waterfall A
+ sessionTable->setVisible(false);
}
- C = A - 150; // Bottom of Monitor, Top of connection list
- W = r.width();
+ // if only displaying one Waterfall, change height of waterfall area
- // Calc Positions of Waterfalls
-
- ui.monWindow->setGeometry(QRect(0, modemBoxHeight, W, C - (modemBoxHeight + 26)));
- sessionTable->setGeometry(QRect(0, C, W, 175));
-
- if (UsingBothChannels)
+ if (UsingBothChannels == 0 || (Firstwaterfall == 0) || (Secondwaterfall == 0))
{
- ui.HeaderA->setGeometry(QRect(0, A, W, 38));
- ui.WaterfallA->setGeometry(QRect(0, A + 38, W, 80));
- ui.HeaderB->setGeometry(QRect(0, B, W, 38));
- ui.WaterfallB->setGeometry(QRect(0, B + 38, W, 80));
- }
- else
- {
- if (soundChannel[0] == RIGHT)
- {
- ui.HeaderB->setGeometry(QRect(0, A, W, 38));
- ui.WaterfallB->setGeometry(QRect(0, A + 38, W, 80));
- }
- else
- {
- ui.HeaderA->setGeometry(QRect(0, A, W, 38));
- ui.WaterfallA->setGeometry(QRect(0, A + 38, W, 80));
- }
+ waterfallsHeight /= 2;
}
+
+ if ((Firstwaterfall == 0) && (Secondwaterfall == 0))
+ waterfallsHeight = 0;
+
+ monitorHeight = Height - sessionHeight - waterfallsHeight - modemBoxHeight;
+ waterfallsTop = Height - waterfallsHeight;
+ sessionTop = Height - (sessionHeight + waterfallsHeight);
+
+ ui.monWindow->setGeometry(QRect(0, monitorTop, Width, monitorHeight));
+
+ if (AGWServ)
+ sessionTable->setGeometry(QRect(0, sessionTop, Width, sessionHeight));
+
+ if (waterfallsHeight)
+ ui.Waterfall->setGeometry(QRect(0, waterfallsTop, Width, waterfallsHeight + 2));
}
QAction * setupMenuLine(QMenu * Menu, char * Label, QObject * parent, int State)
@@ -426,50 +417,40 @@ void QtSoundModem::menuChecked()
int state = Act->isChecked();
if (Act == actWaterfall1)
- {
- int oldstate = Firstwaterfall;
Firstwaterfall = state;
- if (state != oldstate)
- initWaterfall(0, state);
-
- }
else if (Act == actWaterfall2)
- {
- int oldstate = Secondwaterfall;
Secondwaterfall = state;
- if (state != oldstate)
- initWaterfall(1, state);
+ initWaterfall(Firstwaterfall | Secondwaterfall);
- }
saveSettings();
}
-void QtSoundModem::initWaterfall(int chan, int state)
+void QtSoundModem::initWaterfall(int state)
{
if (state == 1)
{
- if (chan == 0)
- {
- ui.WaterfallA = new QLabel(ui.centralWidget);
- WaterfallCopy[0] = ui.WaterfallA;
- }
- else
- {
- ui.WaterfallB = new QLabel(ui.centralWidget);
- WaterfallCopy[1] = ui.WaterfallB;
- }
- Waterfall[chan] = new QImage(1024, 80, QImage::Format_RGB32);
- Waterfall[chan]->fill(black);
+ // if (ui.Waterfall)
+ // {
+ // delete ui.Waterfall;
+ // ui.Waterfall = new QLabel(ui.centralWidget);
+ // }
+ WaterfallCopy = ui.Waterfall;
+
+ Waterfall = new QImage(1024, WaterfallImageHeight + 2, QImage::Format_RGB32);
+
+ NeedWaterfallHeaders = 1;
+
}
else
{
- delete(Waterfall[chan]);
- Waterfall[chan] = 0;
+ delete(Waterfall);
+ Waterfall = 0;
}
QSize Size(800, 602); // Not actually used, but Event constructor needs it
+
QResizeEvent *event = new QResizeEvent(Size, Size);
QApplication::sendEvent(this, event);
}
@@ -518,7 +499,7 @@ void DoPSKWindows()
constellationDialog->resize(NextX, 140);
}
-
+QTimer *wftimer;
QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
{
@@ -530,6 +511,8 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
mythis = this;
+ getSettings();
+
QSettings mysettings("QtSoundModem.ini", QSettings::IniFormat);
family = mysettings.value("FontFamily", "Courier New").toString();
@@ -606,7 +589,7 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
restoreGeometry(mysettings.value("geometry").toByteArray());
restoreState(mysettings.value("windowState").toByteArray());
- sessionTable = new QTableWidget(this);
+ sessionTable = new QTableWidget(ui.centralWidget);
sessionTable->verticalHeader()->setVisible(FALSE);
sessionTable->verticalHeader()->setDefaultSectionSize(20);
@@ -615,7 +598,7 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
sessionTable->setColumnCount(12);
m_TableHeader << "MyCall" << "DestCall" << "Status" << "Sent pkts" << "Sent Bytes" << "Rcvd pkts" << "Rcvd bytes" << "Rcvd FC" << "FEC corr" << "CPS TX" << "CPS RX" << "Direction";
- sessionTable->setStyleSheet("QHeaderView::section { background-color:rgb(224, 224, 224) }");
+ mysetstyle();
sessionTable->setHorizontalHeaderLabels(m_TableHeader);
sessionTable->setColumnWidth(0, 80);
@@ -672,14 +655,11 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
actAbout = ui.menuBar->addAction("&About");
connect(actAbout, SIGNAL(triggered()), this, SLOT(doAbout()));
- Header[0] = new QImage(1024, 38, QImage::Format_RGB32);
- Header[1] = new QImage(1024, 38, QImage::Format_RGB32);
RXLevel = new QImage(150, 10, QImage::Format_RGB32);
RXLevel->fill(white);
ui.RXLevel->setPixmap(QPixmap::fromImage(*RXLevel));
RXLevelCopy = ui.RXLevel;
-
DCDLabel[0] = new QLabel(this);
DCDLabel[0]->setObjectName(QString::fromUtf8("DCDLedA"));
DCDLabel[0]->setGeometry(QRect(280, 31, 12, 12));
@@ -720,42 +700,16 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
chanOffsetLabel[2] = ui.RXOffsetC;
chanOffsetLabel[3] = ui.RXOffsetD;
+ WaterfallCopy = ui.Waterfall;
- // Waterfall[0]->setColorCount(16);
- // Waterfall[1]->setColorCount(16);
+ initWaterfall(Firstwaterfall | Secondwaterfall);
-
- // for (i = 0; i < 16; i++)
- // {
- // Waterfall[0]->setColor(i, vbColours[i]);
- // Waterfall[1]->setColor(i, vbColours[i]);
- // }
-
- WaterfallCopy[0] = ui.WaterfallA;
- WaterfallCopy[1] = ui.WaterfallB;
-
- initWaterfall(0, 1);
- initWaterfall(1, 1);
-
- Header[0]->fill(black);
- Header[1]->fill(black);
-
- HeaderCopy[0] = ui.HeaderA;
- HeaderCopy[1] = ui.HeaderB;
monWindowCopy = ui.monWindow;
ui.monWindow->document()->setMaximumBlockCount(10000);
// connect(ui.monWindow, SIGNAL(selectionChanged()), this, SLOT(onTEselectionChanged()));
- ui.HeaderA->setPixmap(QPixmap::fromImage(*Header[0]));
- ui.HeaderB->setPixmap(QPixmap::fromImage(*Header[1]));
-
- wf_pointer(soundChannel[0]);
- wf_pointer(soundChannel[1]);
- wf_Scale(0);
- wf_Scale(1);
-
connect(ui.modeA, SIGNAL(currentIndexChanged(int)), this, SLOT(clickedSlotI(int)));
connect(ui.modeB, SIGNAL(currentIndexChanged(int)), this, SLOT(clickedSlotI(int)));
connect(ui.modeC, SIGNAL(currentIndexChanged(int)), this, SLOT(clickedSlotI(int)));
@@ -785,7 +739,6 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
ui.DCDSlider->setValue(dcd_threshold);
-
char valChar[32];
sprintf(valChar, "RX Offset %d", rxOffset);
ui.RXOffsetLabel->setText(valChar);
@@ -811,7 +764,7 @@ QtSoundModem::QtSoundModem(QWidget *parent) : QMainWindow(parent)
connect(timer, SIGNAL(timeout()), this, SLOT(MyTimerSlot()));
timer->start(100);
- QTimer *wftimer = new QTimer(this);
+ wftimer = new QTimer(this);
connect(wftimer, SIGNAL(timeout()), this, SLOT(doRestartWF()));
wftimer->start(1000 * 300);
@@ -885,7 +838,7 @@ void extSetOffset(int chan)
sprintf(valChar, "%d", chanOffset[chan]);
chanOffsetLabel[chan]->setText(valChar);
- wf_pointer(soundChannel[chan]);
+ NeedWaterfallHeaders = true;
pnt_change[0] = 1;
pnt_change[1] = 1;
@@ -928,6 +881,18 @@ void QtSoundModem::MyTimerSlot()
DoPSKWindows();
}
+ if (NeedWaterfallHeaders)
+ {
+ NeedWaterfallHeaders = 0;
+
+ if (Waterfall)
+ {
+ Waterfall->fill(black);
+ DrawModemFreqRange();
+ DrawFreqTicks();
+ }
+ }
+
show_grid();
}
@@ -1101,8 +1066,7 @@ void QtSoundModem::clickedSlotI(int i)
sprintf(valChar, "RX Offset %d",rxOffset);
ui.RXOffsetLabel->setText(valChar);
- wf_pointer(soundChannel[0]);
- wf_pointer(soundChannel[1]);
+ NeedWaterfallHeaders = true;
pnt_change[0] = 1;
pnt_change[1] = 1;
@@ -1276,10 +1240,13 @@ void QtSoundModem::clickedSlot()
{
bool ok;
Font = QFontDialog::getFont(&ok, QFont(Font, this));
+
if (ok)
{
// the user clicked OK and font is set to the font the user selected
QApplication::setFont(Font);
+ sessionTable->horizontalHeader()->setFont(Font);
+
saveSettings();
}
else
@@ -1287,7 +1254,7 @@ void QtSoundModem::clickedSlot()
// the user canceled the dialog; font is set to the initial
// value, in this case Helvetica [Cronyx], 10
- QApplication::setFont(Font);
+// QApplication::setFont(Font);
}
return;
@@ -1480,6 +1447,11 @@ void QtSoundModem::doModems()
Dlg->IL2PModeC->setCurrentIndex(il2p_mode[2]);
Dlg->IL2PModeD->setCurrentIndex(il2p_mode[3]);
+ Dlg->CRC_A->setChecked(il2p_crc[0]);
+ Dlg->CRC_B->setChecked(il2p_crc[1]);
+ Dlg->CRC_C->setChecked(il2p_crc[2]);
+ Dlg->CRC_D->setChecked(il2p_crc[3]);
+
Dlg->CWIDCall->setText(CWIDCall);
Dlg->CWIDInterval->setText(QString::number(CWIDInterval));
Dlg->CWIDMark->setText(CWIDMark);
@@ -1569,6 +1541,12 @@ extern "C" void get_exclude_list(char * line, TStringList * list);
void QtSoundModem::modemaccept()
{
modemSave();
+
+ AGW_Report_Modem_Change(0);
+ AGW_Report_Modem_Change(1);
+ AGW_Report_Modem_Change(2);
+ AGW_Report_Modem_Change(3);
+
delete(Dlg);
saveSettings();
@@ -1698,6 +1676,11 @@ void QtSoundModem::modemSave()
il2p_mode[2] = Dlg->IL2PModeC->currentIndex();
il2p_mode[3] = Dlg->IL2PModeD->currentIndex();
+ il2p_crc[0] = Dlg->CRC_A->isChecked();
+ il2p_crc[1] = Dlg->CRC_B->isChecked();
+ il2p_crc[2] = Dlg->CRC_C->isChecked();
+ il2p_crc[3] = Dlg->CRC_D->isChecked();
+
recovery[0] = Dlg->recoverBitA->currentIndex();
recovery[1] = Dlg->recoverBitB->currentIndex();
recovery[2] = Dlg->recoverBitC->currentIndex();
@@ -1749,7 +1732,6 @@ void QtSoundModem::modemSave()
for (i = 0; i < 4; i++)
{
initTStringList(&list_digi_callsigns[i]);
-
get_exclude_list(MyDigiCall[i], &list_digi_callsigns[i]);
}
@@ -1766,6 +1748,7 @@ void QtSoundModem::modemSave()
Q = Dlg->LPFWidthD->text();
lpf[3] = Q.toInt();
*/
+
}
void QtSoundModem::modemreject()
@@ -2139,6 +2122,7 @@ void QtSoundModem::doDevices()
Dev->DualPTT->setChecked(DualPTT);
Dev->multiCore->setChecked(multiCore);
+ Dev->darkTheme->setChecked(darkTheme);
Dev->WaterfallMin->setCurrentIndex(Dev->WaterfallMin->findText(QString::number(WaterfallMin), Qt::MatchFixedString));
Dev->WaterfallMax->setCurrentIndex(Dev->WaterfallMax->findText(QString::number(WaterfallMax), Qt::MatchFixedString));
@@ -2150,6 +2134,33 @@ void QtSoundModem::doDevices()
}
+void QtSoundModem::mysetstyle()
+{
+ if (darkTheme)
+ {
+ qApp->setStyleSheet(
+ "QWidget {color: white; background-color: black}"
+ "QTabBar::tab {color: rgb(127, 127, 127); background-color: black}"
+ "QTabBar::tab::selected {color: white}"
+ "QPushButton {border-style: outset; border-width: 2px; border-color: rgb(127, 127, 127)}"
+ "QPushButton::default {border-style: outset; border-width: 2px; border-color: white}");
+
+ sessionTable->setStyleSheet("QHeaderView::section { background-color:rgb(40, 40, 40) }");
+
+ txText = qRgb(255, 127, 127);
+ rxText = qRgb(173, 216, 230);
+ }
+ else
+ {
+ qApp->setStyleSheet("");
+
+ sessionTable->setStyleSheet("QHeaderView::section { background-color:rgb(224, 224, 224) }");
+
+ txText = qRgb(192, 0, 0);
+ rxText = qRgb(0, 0, 192);
+ }
+}
+
void QtSoundModem::deviceaccept()
{
QVariant Q = Dev->inputDevice->currentText();
@@ -2251,7 +2262,6 @@ void QtSoundModem::deviceaccept()
if (UsingLeft && UsingRight)
UsingBothChannels = 1;
-
SCO = Dev->singleChannelOutput->isChecked();
raduga = Dev->colourWaterfall->isChecked();
AGWServ = Dev->AGWEnabled->isChecked();
@@ -2275,6 +2285,8 @@ void QtSoundModem::deviceaccept()
DualPTT = Dev->DualPTT->isChecked();
TX_rotate = Dev->txRotation->isChecked();
multiCore = Dev->multiCore->isChecked();
+ darkTheme = Dev->darkTheme->isChecked();
+ mysetstyle();
if (Dev->CAT->isChecked())
PTTMode = PTTCAT;
@@ -2360,8 +2372,7 @@ void QtSoundModem::deviceaccept()
ClosePTTPort();
OpenPTTPort();
- wf_pointer(soundChannel[0]);
- wf_pointer(soundChannel[1]);
+ NeedWaterfallHeaders = true;
delete(Dev);
saveSettings();
@@ -2406,33 +2417,55 @@ void QtSoundModem::handleButton(int Port, int Type)
doCalib(Port, Type);
}
+
+
void QtSoundModem::doRestartWF()
{
- if (Firstwaterfall)
+ if (inWaterfall)
{
- initWaterfall(0, 0);
- initWaterfall(0, 1);
- }
+ // in waterfall update thread
- if (Secondwaterfall)
+ wftimer->start(5000);
+ return;
+ }
+
+ lockWaterfall = true;
+
+ if (Firstwaterfall | Secondwaterfall)
{
- initWaterfall(1, 0);
- initWaterfall(1, 1);
+ initWaterfall(0);
+ initWaterfall(1);
}
delete(RXLevel);
delete(ui.RXLevel);
ui.RXLevel = new QLabel(ui.centralWidget);
RXLevelCopy = ui.RXLevel;
- ui.RXLevel->setGeometry(QRect(780, 17, 150, 12));
-// ui.RXLevel->setFrameShape(QFrame::Box);
-// ui.RXLevel->setFrameShadow(QFrame::Sunken);
+ ui.RXLevel->setGeometry(QRect(780, 14, 150, 11));
+ ui.RXLevel->setFrameShape(QFrame::Box);
+ ui.RXLevel->setFrameShadow(QFrame::Sunken);
+
+ delete(RXLevel2);
+ delete(ui.RXLevel2);
+
+ ui.RXLevel2 = new QLabel(ui.centralWidget);
+ RXLevel2Copy = ui.RXLevel2;
+
+ ui.RXLevel2->setGeometry(QRect(780, 23, 150, 11));
+ ui.RXLevel2->setFrameShape(QFrame::Box);
+ ui.RXLevel2->setFrameShadow(QFrame::Sunken);
RXLevel = new QImage(150, 10, QImage::Format_RGB32);
RXLevel->fill(cyan);
-// ui.RXLevel->setPixmap(QPixmap::fromImage(*RXLevel));
+
+ RXLevel2 = new QImage(150, 10, QImage::Format_RGB32);
+ RXLevel2->fill(white);
ui.RXLevel->setVisible(1);
+ if (UsingBothChannels)
+ ui.RXLevel2->setVisible(1);
+
+ lockWaterfall = false;
}
@@ -2489,7 +2522,7 @@ void QtSoundModem::RefreshSpectrum(unsigned char * Data)
// Last 4 bytes are level busy and Tuning lines
- Waterfall[0]->fill(Black);
+ Waterfall->fill(Black);
if (Data[206] != LastLevel)
{
@@ -2510,13 +2543,13 @@ void QtSoundModem::RefreshSpectrum(unsigned char * Data)
if (val > 63)
val = 63;
- Waterfall[0]->setPixel(i, val, Yellow);
+ Waterfall->setPixel(i, val, Yellow);
if (val < 62)
- Waterfall[0]->setPixel(i, val + 1, Gold);
+ Waterfall->setPixel(i, val + 1, Gold);
Data++;
}
- ui.WaterfallA->setPixmap(QPixmap::fromImage(*Waterfall[0]));
+ ui.Waterfall->setPixmap(QPixmap::fromImage(*Waterfall));
}
@@ -2552,7 +2585,7 @@ void QtSoundModem::RefreshWaterfall(int snd_ch, unsigned char * Data)
{
int j;
unsigned char * Line;
- int len = Waterfall[0]->bytesPerLine();
+ int len = Waterfall->bytesPerLine();
int TopLine = NextWaterfallLine[snd_ch];
// Write line to cyclic buffer then draw starting with the line just written
@@ -2565,16 +2598,15 @@ void QtSoundModem::RefreshWaterfall(int snd_ch, unsigned char * Data)
for (j = 63; j > 0; j--)
{
- Line = Waterfall[0]->scanLine(j);
+ Line = Waterfall->scanLine(j);
memcpy(Line, &WaterfallLines[snd_ch][TopLine++][0], len);
if (TopLine > 63)
TopLine = 0;
}
- ui.WaterfallA->setPixmap(QPixmap::fromImage(*Waterfall[0]));
+ ui.Waterfall->setPixmap(QPixmap::fromImage(*Waterfall));
}
-
void QtSoundModem::sendtoTrace(char * Msg, int tx)
{
const QTextCursor old_cursor = monWindowCopy->textCursor();
@@ -2587,9 +2619,9 @@ void QtSoundModem::sendtoTrace(char * Msg, int tx)
// Insert the text at the position of the cursor (which is the end of the document).
if (tx)
- monWindowCopy->setTextColor(qRgb(192, 0, 0));
+ monWindowCopy->setTextColor(txText);
else
- monWindowCopy->setTextColor(qRgb(0, 0, 192));
+ monWindowCopy->setTextColor(rxText);
monWindowCopy->textCursor().insertText(Msg);
@@ -2651,180 +2683,157 @@ extern "C" int nonGUIMode;
// This draws the Frequency Scale on Waterfall
-extern "C" void wf_Scale(int Chan)
+extern "C" void DrawFreqTicks()
{
if (nonGUIMode)
return;
+ // Draw Frequency Markers on waterfall header(s);
+
int x, i;
char Textxx[20];
- QImage * bm = Header[Chan];
+ QImage * bm = Waterfall;
QPainter qPainter(bm);
qPainter.setBrush(Qt::black);
qPainter.setPen(Qt::white);
- if (Chan == 0)
- sprintf(Textxx, "Left");
- else
- sprintf(Textxx, "Right");
+ int Chan;
#ifdef WIN32
- int Top = 3;
+ int Top = 3;
#else
- int Top = 4;
+ int Top = 4;
#endif
+ int Base = 0;
- qPainter.drawText(2, Top, 100, 20, 0, Textxx);
-
- // We drew markers every 100 Hz or 100 / binsize pixels
-
-
- int Markers = ((WaterfallMax - WaterfallMin) / 100) + 5; // Number of Markers to draw
- int Freq = WaterfallMin;
- float PixelsPerMarker = 100.0 / BinSize;
-
-
-
- for (i = 0; i < Markers; i++)
- {
- x = round(PixelsPerMarker * i);
- if (x < 1025)
+ for (Chan = 0; Chan < 2; Chan++)
{
- if ((Freq % 500) == 0)
- qPainter.drawLine(x, 22, x, 15);
+ if (Chan == 1 || ((UsingBothChannels == 0) && (UsingRight == 1)))
+ sprintf(Textxx, "Right");
else
- qPainter.drawLine(x, 22, x, 18);
+ sprintf(Textxx, "Left");
- if ((Freq % 500) == 0)
+ qPainter.drawText(2, Top, 100, 20, 0, Textxx);
+
+ // We drew markers every 100 Hz or 100 / binsize pixels
+
+ int Markers = ((WaterfallMax - WaterfallMin) / 100) + 5; // Number of Markers to draw
+ int Freq = WaterfallMin;
+ float PixelsPerMarker = 100.0 / BinSize;
+
+ for (i = 0; i < Markers; i++)
{
- sprintf(Textxx, "%d", Freq);
+ x = round(PixelsPerMarker * i);
+ if (x < 1025)
+ {
+ if ((Freq % 500) == 0)
+ qPainter.drawLine(x, Base + 22, x, Base + 15);
+ else
+ qPainter.drawLine(x, Base + 22, x, Base + 18);
- if (x < 924)
- qPainter.drawText(x - 12, Top, 100, 20, 0, Textxx);
+ if ((Freq % 500) == 0)
+ {
+ sprintf(Textxx, "%d", Freq);
+
+ if (x < 924)
+ qPainter.drawText(x - 12, Top, 100, 20, 0, Textxx);
+ }
+ }
+ Freq += 100;
}
+
+ if (UsingBothChannels == 0)
+ break;
+
+ Top += WaterfallTotalPixels;
+ Base = WaterfallTotalPixels;
}
- Freq += 100;
- }
- HeaderCopy[Chan]->setPixmap(QPixmap::fromImage(*bm));
}
-// This draws the frequency Markers on the Waterfall
+// These draws the frequency Markers on the Waterfall
-
-void do_pointer(int waterfall)
+void DrawModemFreqRange()
{
if (nonGUIMode)
return;
+ // Draws the modem freq bars on waterfall header(s)
+
int x1, x2, k, pos1, pos2, pos3;
- QImage * bm = Header[waterfall];
+ QImage * bm = Waterfall;
QPainter qPainter(bm);
qPainter.setBrush(Qt::NoBrush);
qPainter.setPen(Qt::white);
- // bm->fill(black);
+ int Chan;
+ int LRtoDisplay = LEFT;
+ int top = 0;
- qPainter.fillRect(0, 23, 1024, 10, Qt::black);
-
- // We drew markers every 100 Hz or 100 / binsize pixels
-
- float PixelsPerHz = 1.0 / BinSize;
- k = 26;
-
- // draw all enabled ports on the ports on this soundcard
-
- // First Modem is always on the first waterfall
- // If second is enabled it is on the first unless different
- // channel from first
-
- for (int i = 0; i < 4; i++)
+ for (Chan = 0; Chan < 2; Chan++)
{
+ if (Chan == 1 || ((UsingBothChannels == 0) && (UsingRight == 1)))
+ LRtoDisplay = RIGHT;
+
+ // bm->fill(black);
+
+ // qPainter.fillRect(top, 23, 1024, 10, Qt::black);
+
+ // We drew markers every 100 Hz or 100 / binsize pixels
+
+ float PixelsPerHz = 1.0 / BinSize;
+ k = 26 + top;
+
+ // draw all enabled ports on the ports on this soundcard
+
+ // First Modem is always on the first waterfall
+ // If second is enabled it is on the first unless different
+ // channel from first
+
+ for (int i = 0; i < 4; i++)
+ {
+ if (soundChannel[i] != LRtoDisplay)
+ continue;
+
+ pos1 = roundf((((rxOffset + chanOffset[i] + rx_freq[i]) - 0.5*rx_shift[i]) - WaterfallMin) * PixelsPerHz) - 5;
+ pos2 = roundf((((rxOffset + chanOffset[i] + rx_freq[i]) + 0.5*rx_shift[i]) - WaterfallMin) * PixelsPerHz) - 5;
+ pos3 = roundf(((rxOffset + chanOffset[i] + rx_freq[i])) - WaterfallMin * PixelsPerHz);
+ x1 = pos1 + 5;
+ x2 = pos2 + 5;
+
+ qPainter.setPen(Qt::white);
+ qPainter.drawLine(x1, k, x2, k);
+ qPainter.drawLine(x1, k - 3, x1, k + 3);
+ qPainter.drawLine(x2, k - 3, x2, k + 3);
+ // qPainter.drawLine(pos3, k - 3, pos3, k + 3);
+
+ if (rxOffset || chanOffset[i])
+ {
+ // Draw TX posn if rxOffset used
+
+ pos3 = roundf((rx_freq[i] - WaterfallMin) * PixelsPerHz);
+ qPainter.setPen(Qt::magenta);
+ qPainter.drawLine(pos3, k - 3, pos3, k + 3);
+ qPainter.drawLine(pos3, k - 3, pos3, k + 3);
+ qPainter.drawLine(pos3 - 2, k - 3, pos3 + 2, k - 3);
+ }
+
+ k += 3;
+ }
if (UsingBothChannels == 0)
- {
- // Only One Waterfall. If first chan is
+ break;
- if ((waterfall == 0 && soundChannel[i] == RIGHT) || (waterfall == 1 && soundChannel[i] == LEFT))
- return;
- }
-
- if (soundChannel[i] == 0)
- continue;
-
-
- if (UsingBothChannels == 1)
- if ((waterfall == 0 && soundChannel[i] == RIGHT) || (waterfall == 1 && soundChannel[i] == LEFT))
- continue;
-
- pos1 = roundf((((rxOffset + chanOffset[i] + rx_freq[i]) - 0.5*rx_shift[i]) - WaterfallMin) * PixelsPerHz) - 5;
- pos2 = roundf((((rxOffset + chanOffset[i] + rx_freq[i]) + 0.5*rx_shift[i]) - WaterfallMin) * PixelsPerHz) - 5;
- pos3 = roundf(((rxOffset + chanOffset[i] + rx_freq[i])) - WaterfallMin * PixelsPerHz);
- x1 = pos1 + 5;
- x2 = pos2 + 5;
-
- qPainter.setPen(Qt::white);
- qPainter.drawLine(x1, k, x2, k);
- qPainter.drawLine(x1, k - 3, x1, k + 3);
- qPainter.drawLine(x2, k - 3, x2, k + 3);
- qPainter.drawLine(pos3, k - 3, pos3, k + 3);
-
- if (rxOffset || chanOffset[i])
- {
- // Draw TX posn if rxOffset used
-
- pos3 = roundf((rx_freq[i] - WaterfallMin) * PixelsPerHz);
- qPainter.setPen(Qt::magenta);
- qPainter.drawLine(pos3, k - 3, pos3, k + 3);
- qPainter.drawLine(pos3, k - 3, pos3, k + 3);
- qPainter.drawLine(pos3 - 2, k - 3, pos3 + 2, k - 3);
- }
-
- k += 3;
+ LRtoDisplay = RIGHT;
+ top = WaterfallTotalPixels;
}
- HeaderCopy[waterfall]->setPixmap(QPixmap::fromImage(*bm));
-}
-
-void wf_pointer(int snd_ch)
-{
- UNUSED(snd_ch);
-
- do_pointer(0);
- do_pointer(1);
-// do_pointer(2);
-// do_pointer(3);
}
void doWaterfallThread(void * param);
-/*
-#ifdef WIN32
-
-#define pthread_t uintptr_t
-
-extern "C" uintptr_t _beginthread(void(__cdecl *start_address)(void *), unsigned stack_size, void *arglist);
-
-#else
-
-#include
-
-extern "C" pthread_t _beginthread(void(*start_address)(void *), unsigned stack_size, void * arglist)
-{
- pthread_t thread;
-
- if (pthread_create(&thread, NULL, (void * (*)(void *))start_address, (void*)arglist) != 0)
- perror("New Thread");
- else
- pthread_detach(thread);
-
- return thread;
-}
-
-#endif
-*/
extern "C" void doWaterfall(int snd_ch)
{
if (nonGUIMode)
@@ -2833,6 +2842,9 @@ extern "C" void doWaterfall(int snd_ch)
if (Closing)
return;
+ if (lockWaterfall)
+ return;
+
// if (multiCore) // Run modems in separate threads
// _beginthread(doWaterfallThread, 0, xx);
// else
@@ -2840,6 +2852,20 @@ extern "C" void doWaterfall(int snd_ch)
}
+extern "C" void displayWaterfall()
+{
+ // if we are using both channels but only want right need to extract correct half of Image
+
+ if (Waterfall == nullptr)
+ return;
+
+ if (UsingBothChannels && (Firstwaterfall == 0))
+ WaterfallCopy->setAlignment(Qt::AlignBottom | Qt::AlignLeft);
+ else
+ WaterfallCopy->setAlignment(Qt::AlignTop | Qt::AlignLeft);
+
+ WaterfallCopy->setPixmap(QPixmap::fromImage(*Waterfall));
+}
extern "C" float aFFTAmpl[1024];
extern "C" void SMUpdateBusyDetector(int LR, float * Real, float *Imag);
@@ -2847,13 +2873,20 @@ extern "C" void SMUpdateBusyDetector(int LR, float * Real, float *Imag);
void doWaterfallThread(void * param)
{
int snd_ch = (int)(size_t)param;
- int WaterfallNumber = snd_ch;
+
+ if (lockWaterfall)
+ return;
+
+ if (Configuring)
+ return;
+
+ inWaterfall = true; // don't allow restart waterfall
if (snd_ch == 1 && UsingLeft == 0) // Only using right
snd_ch = 0; // Samples are in first buffer
- QImage * bm = Waterfall[snd_ch];
-
+ QImage * bm = Waterfall;
+
int i;
single mag;
UCHAR * p;
@@ -2865,9 +2898,8 @@ void doWaterfallThread(void * param)
float RealOut[8192] = { 0 };
float ImagOut[8192];
- if (Configuring)
- return;
+ RefreshLevel(CurrentLevel); // Signal Level
hFFTSize = FFTSize / 2;
@@ -2909,7 +2941,7 @@ void doWaterfallThread(void * param)
}
}
else
- {
+ {
dofft(&fft_buf[snd_ch][0], RealOut, ImagOut);
// FourierTransform(1024, &fft_buf[snd_ch][0], RealOut, ImagOut, 0);
@@ -2950,71 +2982,70 @@ void doWaterfallThread(void * param)
SMUpdateBusyDetector(snd_ch, RealOut, ImagOut);
- RefreshLevel(CurrentLevel); // Signal Level
+ // we always do fft so we can get centre freq and do busy detect. But only upodate waterfall if on display
if (bm == 0)
+ {
+ inWaterfall = false;
return;
-
- try
- {
-
- p = Line;
- lineLen = bm->bytesPerLine();
-
- if (raduga == DISP_MONO)
- {
- for (i = Start; i < End; i++)
- {
- n = fft_disp[snd_ch][i];
- *(p++) = n; // all colours the same
- *(p++) = n;
- *(p++) = n;
- p++;
- }
- }
- else
- {
- for (i = Start; i < End; i++)
- {
- n = fft_disp[snd_ch][i];
- memcpy(p, &RGBWF[n], 4);
- p += 4;
- }
- }
-
- // Scroll
-
- int TopLine = NextWaterfallLine[snd_ch];
-
- // Write line to cyclic buffer then draw starting with the line just written
-
- memcpy(&WaterfallLines[snd_ch][NextWaterfallLine[snd_ch]++][0], Line, 4096);
- if (NextWaterfallLine[snd_ch] > 79)
- NextWaterfallLine[snd_ch] = 0;
-
- for (int j = 79; j > 0; j--)
- {
- p = bm->scanLine(j);
- memcpy(p, &WaterfallLines[snd_ch][TopLine][0], lineLen);
- TopLine++;
- if (TopLine > 79)
- TopLine = 0;
- }
-
- WaterfallCopy[WaterfallNumber]->setPixmap(QPixmap::fromImage(*bm));
- // WaterfallCopy[snd_ch - 1]->setPixmap(*pm);
- // WaterfallCopy[1]->setPixmap(QPixmap::fromImage(*bm));
}
- catch (const std::exception& e) // caught by reference to base
+ if ((Firstwaterfall == 0 && snd_ch == 0) || (Secondwaterfall == 0 && snd_ch == 1))
{
- qDebug() << " a standard exception was caught, with message '"
- << e.what() << "'\n";
+ inWaterfall = false;
+ return;
}
+ p = Line;
+ lineLen = 4096;
+
+ if (raduga == DISP_MONO)
+ {
+ for (i = Start; i < End; i++)
+ {
+ n = fft_disp[snd_ch][i];
+ *(p++) = n; // all colours the same
+ *(p++) = n;
+ *(p++) = n;
+ p++;
+ }
+ }
+ else
+ {
+ for (i = Start; i < End; i++)
+ {
+ n = fft_disp[snd_ch][i];
+ memcpy(p, &RGBWF[n], 4);
+ p += 4;
+ }
+ }
+
+ // Scroll
+
+ int TopLine = NextWaterfallLine[snd_ch];
+ int TopScanLine = WaterfallHeaderPixels;
+
+ if (snd_ch)
+ TopScanLine += WaterfallTotalPixels;
+
+ // Write line to cyclic buffer then draw starting with the line just written
+
+ memcpy(&WaterfallLines[snd_ch][NextWaterfallLine[snd_ch]++][0], Line, 4096);
+ if (NextWaterfallLine[snd_ch] > 79)
+ NextWaterfallLine[snd_ch] = 0;
+
+ for (int j = 79; j > 0; j--)
+ {
+ p = bm->scanLine(j + TopScanLine);
+ memcpy(p, &WaterfallLines[snd_ch][TopLine][0], lineLen);
+ TopLine++;
+ if (TopLine > 79)
+ TopLine = 0;
+ }
+
+ inWaterfall = false;
}
-
void QtSoundModem::changeEvent(QEvent* e)
{
if (e->type() == QEvent::WindowStateChange)
diff --git a/QtSoundModem.h b/QtSoundModem.h
index fc21d79..626ddd9 100644
--- a/QtSoundModem.h
+++ b/QtSoundModem.h
@@ -29,7 +29,7 @@ public:
~QtSoundModem();
void RefreshWaterfall(int snd_ch, unsigned char * Data);
- void initWaterfall(int chan, int state);
+ void initWaterfall(int state);
void show_grid();
void checkforCWID();
@@ -39,6 +39,7 @@ private slots:
void CWIDTimer();
void doDevices();
+ void mysetstyle();
void updateFont();
void MinimizetoTray();
void TrayActivated(QSystemTrayIcon::ActivationReason reason);
@@ -111,3 +112,9 @@ protected:
bool eventFilter(QObject *obj, QEvent *event) override;
};
+
+#define WaterfallDisplayPixels 80
+#define WaterfallHeaderPixels 38
+#define WaterfallTotalPixels WaterfallDisplayPixels + WaterfallHeaderPixels
+#define WaterfallImageHeight (WaterfallTotalPixels + WaterfallTotalPixels)
+
diff --git a/QtSoundModem.ui b/QtSoundModem.ui
index e264b7d..1d7b110 100644
--- a/QtSoundModem.ui
+++ b/QtSoundModem.ui
@@ -6,8 +6,8 @@
0
0
- 962
- 721
+ 993
+ 900
@@ -50,48 +50,6 @@
-
-
-
- 0
- 586
- 959
- 80
-
-
-
-
- 0
- 0
-
-
-
-
- 600
- 80
-
-
-
-
- 5000
- 100
-
-
-
-
- 8
-
-
-
- QFrame::Box
-
-
- QFrame::Plain
-
-
- Waterfall
-
-
@@ -121,25 +79,25 @@
1500
-
+
80
488
881
- 80
+ 100
600
- 80
+ 100
5000
- 100
+ 250
@@ -171,9 +129,9 @@
690
- 0
+ 2
73
- 16
+ 13
@@ -215,78 +173,6 @@
10
-
-
-
- 25
- 460
- 1076
- 38
-
-
-
-
- 600
- 10
-
-
-
-
- 5000
- 100
-
-
-
-
- 8
-
-
-
- QFrame::Box
-
-
- QFrame::Plain
-
-
- Waterfall
-
-
-
-
-
- 10
- 560
- 1076
- 38
-
-
-
-
- 600
- 10
-
-
-
-
- 5000
- 100
-
-
-
-
- 8
-
-
-
- QFrame::Box
-
-
- QFrame::Plain
-
-
- Waterfall
-
-
@@ -412,7 +298,7 @@
600
2
87
- 16
+ 13
@@ -487,9 +373,9 @@
780
- 17
+ 14
150
- 12
+ 11
@@ -508,7 +394,7 @@
780
0
91
- 16
+ 13
@@ -526,13 +412,32 @@
true
+
+
+
+ 780
+ 23
+ 150
+ 11
+
+
+
+ QFrame::Box
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+
+
+ 260
+ 304
+ 161
+ 17
+
+
+
+ Dark Theme
+
+
diff --git a/digipeater.h b/digipeater.h
deleted file mode 100644
index 5c84976..0000000
--- a/digipeater.h
+++ /dev/null
@@ -1,78 +0,0 @@
-
-#ifndef DIGIPEATER_H
-#define DIGIPEATER_H 1
-
-#include "regex.h"
-
-#include "direwolf.h" /* for MAX_CHANS */
-#include "ax25_pad.h" /* for packet_t */
-#include "audio.h" /* for radio channel properties */
-
-
-/*
- * Information required for digipeating.
- *
- * The configuration file reader fills in this information
- * and it is passed to digipeater_init at application start up time.
- */
-
-
-struct digi_config_s {
-
-
- int dedupe_time; /* Don't digipeat duplicate packets */
- /* within this number of seconds. */
-
-#define DEFAULT_DEDUPE 30
-
-/*
- * Rules for each of the [from_chan][to_chan] combinations.
- */
-
- regex_t alias[MAX_CHANS][MAX_CHANS];
-
- regex_t wide[MAX_CHANS][MAX_CHANS];
-
- int enabled[MAX_CHANS][MAX_CHANS];
-
- enum preempt_e { PREEMPT_OFF, PREEMPT_DROP, PREEMPT_MARK, PREEMPT_TRACE } preempt[MAX_CHANS][MAX_CHANS];
-
- // ATGP is an ugly hack for the specific need of ATGP which needs more that 8 digipeaters.
- // DO NOT put this in the User Guide. On a need to know basis.
-
- char atgp[MAX_CHANS][MAX_CHANS][AX25_MAX_ADDR_LEN];
-
- char *filter_str[MAX_CHANS+1][MAX_CHANS+1];
- // NULL or optional Packet Filter strings such as "t/m".
- // Notice the size of arrays is one larger than normal.
- // That extra position is for the IGate.
-
- int regen[MAX_CHANS][MAX_CHANS]; // Regenerate packet.
- // Sort of like digipeating but passed along unchanged.
-};
-
-/*
- * Call once at application start up time.
- */
-
-extern void digipeater_init (struct audio_s *p_audio_config, struct digi_config_s *p_digi_config);
-
-/*
- * Call this for each packet received.
- * Suitable packets will be queued for transmission.
- */
-
-extern void digipeater (int from_chan, packet_t pp);
-
-void digi_regen (int from_chan, packet_t pp);
-
-
-/* Make statistics available. */
-
-int digipeater_get_count (int from_chan, int to_chan);
-
-
-#endif
-
-/* end digipeater.h */
-
diff --git a/dlq.h b/dlq.h
deleted file mode 100644
index 8771636..0000000
--- a/dlq.h
+++ /dev/null
@@ -1,148 +0,0 @@
-
-/*------------------------------------------------------------------
- *
- * Module: dlq.h
- *
- *---------------------------------------------------------------*/
-
-#ifndef DLQ_H
-#define DLQ_H 1
-
-#include "ax25_pad.h"
-#include "audio.h"
-
-
-/* A transmit or receive data block for connected mode. */
-
-typedef struct cdata_s {
- int magic; /* For integrity checking. */
-
-#define TXDATA_MAGIC 0x09110911
-
- struct cdata_s *next; /* Pointer to next when part of a list. */
-
- int pid; /* Protocol id. */
-
- int size; /* Number of bytes allocated. */
-
- int len; /* Number of bytes actually used. */
-
- char data[]; /* Variable length data. */
-
-} cdata_t;
-
-
-
-/* Types of things that can be in queue. */
-
-typedef enum dlq_type_e {DLQ_REC_FRAME, DLQ_CONNECT_REQUEST, DLQ_DISCONNECT_REQUEST, DLQ_XMIT_DATA_REQUEST, DLQ_REGISTER_CALLSIGN, DLQ_UNREGISTER_CALLSIGN, DLQ_OUTSTANDING_FRAMES_REQUEST, DLQ_CHANNEL_BUSY, DLQ_SEIZE_CONFIRM, DLQ_CLIENT_CLEANUP} dlq_type_t;
-
-
-/* A queue item. */
-
-// TODO: call this event rather than item.
-// TODO: should add fences.
-
-typedef struct dlq_item_s {
-
- struct dlq_item_s *nextp; /* Next item in queue. */
-
- dlq_type_t type; /* Type of item. */
- /* See enum definition above. */
-
- int chan; /* Radio channel of origin. */
-
-// I'm not worried about amount of memory used but this might be a
-// little clearer if a union was used for the different event types.
-
-// Used for received frame.
-
- int subchan; /* Winning "subchannel" when using multiple */
- /* decoders on one channel. */
- /* Special case, -1 means DTMF decoder. */
- /* Maybe we should have a different type in this case? */
-
- int slice; /* Winning slicer. */
-
- packet_t pp; /* Pointer to frame structure. */
-
- alevel_t alevel; /* Audio level. */
-
- int is_fx25; /* Was it from FX.25? */
-
- retry_t retries; /* Effort expended to get a valid CRC. */
- /* Bits changed for regular AX.25. */
- /* Number of bytes fixed for FX.25. */
-
- char spectrum[MAX_SUBCHANS*MAX_SLICERS+1]; /* "Spectrum" display for multi-decoders. */
-
-// Used by requests from a client application, connect, etc.
-
- char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN];
-
- int num_addr; /* Range 2 .. 10. */
-
- int client;
-
-
-// Used only by client request to transmit connected data.
-
- cdata_t *txdata;
-
-// Used for channel activity change.
-// It is useful to know when the channel is busy either for carrier detect
-// or when we are transmitting.
-
- int activity; /* OCTYPE_PTT for my transmission start/end. */
- /* OCTYPE_DCD if we hear someone else. */
-
- int status; /* 1 for active or 0 for quiet. */
-
-} dlq_item_t;
-
-
-
-void dlq_init (void);
-
-
-
-void dlq_rec_frame (int chan, int subchan, int slice, packet_t pp, alevel_t alevel, int is_fx25, retry_t retries, char *spectrum);
-
-void dlq_connect_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client, int pid);
-
-void dlq_disconnect_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client);
-
-void dlq_outstanding_frames_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client);
-
-void dlq_xmit_data_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client, int pid, char *xdata_ptr, int xdata_len);
-
-void dlq_register_callsign (char addr[AX25_MAX_ADDR_LEN], int chan, int client);
-
-void dlq_unregister_callsign (char addr[AX25_MAX_ADDR_LEN], int chan, int client);
-
-void dlq_channel_busy (int chan, int activity, int status);
-
-void dlq_seize_confirm (int chan);
-
-void dlq_client_cleanup (int client);
-
-
-
-int dlq_wait_while_empty (double timeout_val);
-
-struct dlq_item_s *dlq_remove (void);
-
-void dlq_delete (struct dlq_item_s *pitem);
-
-
-
-cdata_t *cdata_new (int pid, char *data, int len);
-
-void cdata_delete (cdata_t *txdata);
-
-void cdata_check_leak (void);
-
-
-#endif
-
-/* end dlq.h */
diff --git a/dns_sd_common.h b/dns_sd_common.h
deleted file mode 100644
index f104bf8..0000000
--- a/dns_sd_common.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
-
-char *dns_sd_default_service_name(void);
-
-#endif
-
diff --git a/dns_sd_dw.h b/dns_sd_dw.h
deleted file mode 100644
index 79f4b86..0000000
--- a/dns_sd_dw.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
-
-#include "config.h"
-
-#define DNS_SD_SERVICE "_kiss-tnc._tcp"
-
-void dns_sd_announce (struct misc_config_s *mc);
-
-#endif // USE_AVAHI_CLIENT
diff --git a/dtime_now.h b/dtime_now.h
deleted file mode 100644
index 411534b..0000000
--- a/dtime_now.h
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-extern double dtime_realtime (void);
-
-extern double dtime_monotonic (void);
-
-
-void timestamp_now (char *result, int result_size, int show_ms);
-
-void timestamp_user_format (char *result, int result_size, char *user_format);
-
-void timestamp_filename (char *result, int result_size);
-
-
-// FIXME: remove temp workaround.
-// Needs many scattered updates.
-
-#define dtime_now dtime_realtime
diff --git a/dtmf.h b/dtmf.h
deleted file mode 100644
index c1b52b9..0000000
--- a/dtmf.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* dtmf.h */
-
-
-#include "audio.h"
-
-void dtmf_init (struct audio_s *p_audio_config, int amp);
-
-char dtmf_sample (int c, float input);
-
-int dtmf_send (int chan, char *str, int speed, int txdelay, int txtail);
-
-
-/* end dtmf.h */
-
diff --git a/dw9600.c b/dw9600.c
index 8307342..407feb1 100644
--- a/dw9600.c
+++ b/dw9600.c
@@ -25,6 +25,7 @@ typedef struct TStringList_T
extern int fx25_mode[4];
extern int il2p_mode[4];
+extern int il2p_crc[4];
extern short rx_baudrate[5];
#define FX25_MODE_NONE 0
diff --git a/dwgps.h b/dwgps.h
deleted file mode 100644
index 78f821f..0000000
--- a/dwgps.h
+++ /dev/null
@@ -1,61 +0,0 @@
-
-/* dwgps.h */
-
-#ifndef DWGPS_H
-#define DWGPS_H 1
-
-
-#include
-#include "config.h" /* for struct misc_config_s */
-
-
-/*
- * Values for fix, equivalent to values from libgps.
- * -2 = not initialized.
- * -1 = error communicating with GPS receiver.
- * 0 = nothing heard yet.
- * 1 = had signal but lost it.
- * 2 = 2D.
- * 3 = 3D.
- *
- * Undefined float & double values are set to G_UNKNOWN.
- *
- */
-
-enum dwfix_e { DWFIX_NOT_INIT= -2, DWFIX_ERROR= -1, DWFIX_NOT_SEEN=0, DWFIX_NO_FIX=1, DWFIX_2D=2, DWFIX_3D=3 };
-
-typedef enum dwfix_e dwfix_t;
-
-typedef struct dwgps_info_s {
- time_t timestamp; /* When last updated. System time. */
- dwfix_t fix; /* Quality of position fix. */
- double dlat; /* Latitude. Valid if fix >= 2. */
- double dlon; /* Longitude. Valid if fix >= 2. */
- float speed_knots; /* libgps uses meters/sec but we use GPS usual knots. */
- float track; /* What is difference between track and course? */
- float altitude; /* meters above mean sea level. Valid if fix == 3. */
-} dwgps_info_t;
-
-
-
-
-
-void dwgps_init (struct misc_config_s *pconfig, int debug);
-
-void dwgps_clear (dwgps_info_t *gpsinfo);
-
-dwfix_t dwgps_read (dwgps_info_t *gpsinfo);
-
-void dwgps_print (char *msg, dwgps_info_t *gpsinfo);
-
-void dwgps_term (void);
-
-void dwgps_set_data (dwgps_info_t *gpsinfo);
-
-
-#endif /* DWGPS_H 1 */
-
-/* end dwgps.h */
-
-
-
diff --git a/dwgpsd.h b/dwgpsd.h
deleted file mode 100644
index 4c0e0fd..0000000
--- a/dwgpsd.h
+++ /dev/null
@@ -1,22 +0,0 @@
-
-/* dwgpsd.h - For communicating with daemon */
-
-
-
-#ifndef DWGPSD_H
-#define DWGPSD_H 1
-
-#include "config.h"
-
-
-int dwgpsd_init (struct misc_config_s *pconfig, int debug);
-
-void dwgpsd_term (void);
-
-#endif
-
-
-/* end dwgpsd.h */
-
-
-
diff --git a/dwgpsnmea.h b/dwgpsnmea.h
deleted file mode 100644
index ffe5a12..0000000
--- a/dwgpsnmea.h
+++ /dev/null
@@ -1,32 +0,0 @@
-
-/* dwgpsnmea.h - For reading NMEA sentences over serial port */
-
-
-
-#ifndef DWGPSNMEA_H
-#define DWGPSNMEA_H 1
-
-#include "dwgps.h" /* for dwfix_t */
-#include "config.h"
-#include "serial_port.h" /* for MYFDTYPE */
-
-
-int dwgpsnmea_init (struct misc_config_s *pconfig, int debug);
-
-MYFDTYPE dwgpsnmea_get_fd(char *wp_port_name, int speed);
-
-void dwgpsnmea_term (void);
-
-
-dwfix_t dwgpsnmea_gprmc (char *sentence, int quiet, double *odlat, double *odlon, float *oknots, float *ocourse);
-
-dwfix_t dwgpsnmea_gpgga (char *sentence, int quiet, double *odlat, double *odlon, float *oalt, int *onsat);
-
-
-#endif
-
-
-/* end dwgpsnmea.h */
-
-
-
diff --git a/dwsock.h b/dwsock.h
deleted file mode 100644
index 986f6a2..0000000
--- a/dwsock.h
+++ /dev/null
@@ -1,21 +0,0 @@
-
-/* dwsock.h - Socket helper functions. */
-
-#ifndef DWSOCK_H
-#define DWSOCK_H 1
-
-#define DWSOCK_IPADDR_LEN 48 // Size of string to hold IPv4 or IPv6 address.
- // I think 40 would be adequate but we'll make
- // it a little larger just to be safe.
- // Use INET6_ADDRSTRLEN (from netinet/in.h) instead?
-
-int dwsock_init (void);
-
-int dwsock_connect (char *hostname, char *port, char *description, int allow_ipv6, int debug, char ipaddr_str[DWSOCK_IPADDR_LEN]);
- /* ipaddr_str needs to be at least SOCK_IPADDR_LEN bytes */
-
-char *dwsock_ia_to_text (int Family, void * pAddr, char * pStringBuf, size_t StringBufSize);
-
-void dwsock_close (int fd);
-
-#endif
\ No newline at end of file
diff --git a/encode_aprs.h b/encode_aprs.h
deleted file mode 100644
index dc7b8bd..0000000
--- a/encode_aprs.h
+++ /dev/null
@@ -1,17 +0,0 @@
-
-int encode_position (int messaging, int compressed, double lat, double lon, int ambiguity, int alt_ft,
- char symtab, char symbol,
- int power, int height, int gain, char *dir,
- int course, int speed_knots,
- float freq, float tone, float offset,
- char *comment,
- char *presult, size_t result_size);
-
-int encode_object (char *name, int compressed, time_t thyme, double lat, double lon, int ambiguity,
- char symtab, char symbol,
- int power, int height, int gain, char *dir,
- int course, int speed_knots,
- float freq, float tone, float offset, char *comment,
- char *presult, size_t result_size);
-
-int encode_message (char *addressee, char *text, char *id, char *presult, size_t result_size);
diff --git a/fcs_calc.h b/fcs_calc.h
deleted file mode 100644
index 2e2b0ef..0000000
--- a/fcs_calc.h
+++ /dev/null
@@ -1,11 +0,0 @@
-
-/* fcs_calc.h */
-
-
-unsigned short fcs_calc (unsigned char *data, int len);
-
-unsigned short crc16 (unsigned char *data, int len, unsigned short seed);
-
-/* end fcs_calc.h */
-
-
diff --git a/fsk_filters.h b/fsk_filters.h
deleted file mode 100644
index 81c4e9a..0000000
--- a/fsk_filters.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* 1200 bits/sec with Audio sample rate = 11025 */
-/* Mark freq = 1200, Space freq = 2200 */
-
-static const signed short m_sin_table[9] = { 0 , 7347 , 11257 , 9899 , 3909 , -3909 , -9899 , -11257 , -7347 };
-static const signed short m_cos_table[9] = { 11431 , 8756 , 1984 , -5715 , -10741 , -10741 , -5715 , 1984 , 8756 };
-static const signed short s_sin_table[9] = { 0 , 10950 , 6281 , -7347 , -10496 , 1327 , 11257 , 5130 , -8314 };
-static const signed short s_cos_table[9] = { 11431 , 3278 , -9550 , -8756 , 4527 , 11353 , 1984 , -10215 , -7844 };
diff --git a/fsk_gen_filter.h b/fsk_gen_filter.h
deleted file mode 100644
index e7e8fa6..0000000
--- a/fsk_gen_filter.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-#ifndef FSK_GEN_FILTER_H
-#define FSK_GEN_FILTER_H 1
-
-#include "audio.h"
-#include "fsk_demod_state.h"
-
-void fsk_gen_filter (int samples_per_sec,
- int baud,
- int mark_freq, int space_freq,
- char profile,
- struct demodulator_state_s *D);
-
-#endif
\ No newline at end of file
diff --git a/gen_tone.h b/gen_tone.h
deleted file mode 100644
index bbe23b5..0000000
--- a/gen_tone.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * gen_tone.h
- */
-
-
-int gen_tone_init (struct audio_s *pp, int amp, int gen_packets);
-
-
-//int gen_tone_open (int nchan, int sample_rate, int bit_rate, int f1, int f2, int amp, char *fname);
-
-//int gen_tone_open_fd (int nchan, int sample_rate, int bit_rate, int f1, int f2, int amp, int fd) ;
-
-//int gen_tone_close (void);
-
-void tone_gen_put_bit (int chan, int dat);
-
-void gen_tone_put_sample (int chan, int a, int sam);
\ No newline at end of file
diff --git a/grm_sym.h b/grm_sym.h
deleted file mode 100644
index 7a15041..0000000
--- a/grm_sym.h
+++ /dev/null
@@ -1,501 +0,0 @@
-
-/*
- * grm_sym.h
- *
- * Symbol codes for use in $PGRMWPL sentence.
- *
- * Copied from
- * Garmin Device Interface Specification
- * May 19, 2006
- * Drawing Number: 001-00063-00 Rev. C
- */
-
-
-typedef unsigned short symbol_type_t;
-
-enum symbol_type_e
-{
-/*---------------------------------------------------------------
-Marine symbols
----------------------------------------------------------------*/
-sym_anchor = 0, /* white anchor symbol */
-sym_bell = 1, /* white bell symbol */
-sym_diamond_grn = 2, /* green diamond symbol */
-sym_diamond_red = 3, /* red diamond symbol */
-sym_dive1 = 4, /* diver down flag 1 */
-sym_dive2 = 5, /* diver down flag 2 */
-sym_dollar = 6, /* white dollar symbol */
-sym_fish = 7, /* white fish symbol */
-sym_fuel = 8, /* white fuel symbol */
-sym_horn = 9, /* white horn symbol */
-sym_house = 10, /* white house symbol */
-sym_knife = 11, /* white knife & fork symbol */
-sym_light = 12, /* white light symbol */
-sym_mug = 13, /* white mug symbol */
-sym_skull = 14, /* white skull and crossbones symbol*/
-sym_square_grn = 15, /* green square symbol */
-sym_square_red = 16, /* red square symbol */
-sym_wbuoy = 17, /* white buoy waypoint symbol */
-sym_wpt_dot = 18, /* waypoint dot */
-sym_wreck = 19, /* white wreck symbol */
-sym_null = 20, /* null symbol (transparent) */
-sym_mob = 21, /* man overboard symbol */
-sym_buoy_ambr = 22, /* amber map buoy symbol */
-sym_buoy_blck = 23, /* black map buoy symbol */
-sym_buoy_blue = 24, /* blue map buoy symbol */
-sym_buoy_grn = 25, /* green map buoy symbol */
-sym_buoy_grn_red = 26, /* green/red map buoy symbol */
-sym_buoy_grn_wht = 27, /* green/white map buoy symbol */
-sym_buoy_orng = 28, /* orange map buoy symbol */
-sym_buoy_red = 29, /* red map buoy symbol */
-sym_buoy_red_grn = 30, /* red/green map buoy symbol */
-sym_buoy_red_wht = 31, /* red/white map buoy symbol */
-sym_buoy_violet = 32, /* violet map buoy symbol */
-sym_buoy_wht = 33, /* white map buoy symbol */
-sym_buoy_wht_grn = 34, /* white/green map buoy symbol */
-sym_buoy_wht_red = 35, /* white/red map buoy symbol */
-sym_dot = 36, /* white dot symbol */
-sym_rbcn = 37, /* radio beacon symbol */
-sym_boat_ramp = 150, /* boat ramp symbol */
-sym_camp = 151, /* campground symbol */
-sym_restrooms = 152, /* restrooms symbol */
-sym_showers = 153, /* shower symbol */
-sym_drinking_wtr = 154, /* drinking water symbol */
-sym_phone = 155, /* telephone symbol */
-sym_1st_aid = 156, /* first aid symbol */
-sym_info = 157, /* information symbol */
-sym_parking = 158, /* parking symbol */
-sym_park = 159, /* park symbol */
-sym_picnic = 160, /* picnic symbol */
-sym_scenic = 161, /* scenic area symbol */
-sym_skiing = 162, /* skiing symbol */
-sym_swimming = 163, /* swimming symbol */
-sym_dam = 164, /* dam symbol */
-sym_controlled = 165, /* controlled area symbol */
-sym_danger = 166, /* danger symbol */
-sym_restricted = 167, /* restricted area symbol */
-sym_null_2 = 168, /* null symbol */
-sym_ball = 169, /* ball symbol */
-sym_car = 170, /* car symbol */
-sym_deer = 171, /* deer symbol */
-sym_shpng_cart = 172, /* shopping cart symbol */
-sym_lodging = 173, /* lodging symbol */
-sym_mine = 174, /* mine symbol */
-sym_trail_head = 175, /* trail head symbol */
-sym_truck_stop = 176, /* truck stop symbol */
-sym_user_exit = 177, /* user exit symbol */
-sym_flag = 178, /* flag symbol */
-sym_circle_x = 179, /* circle with x in the center */
-sym_open_24hr = 180, /* open 24 hours symbol */
-sym_fhs_facility = 181, /* U Fishing Hot Spots(tm) Facility */
-sym_bot_cond = 182, /* Bottom Conditions */
-sym_tide_pred_stn = 183, /* Tide/Current Prediction Station */
-sym_anchor_prohib = 184, /* U anchor prohibited symbol */
-sym_beacon = 185, /* U beacon symbol */
-sym_coast_guard = 186, /* U coast guard symbol */
-sym_reef = 187, /* U reef symbol */
-sym_weedbed = 188, /* U weedbed symbol */
-sym_dropoff = 189, /* U dropoff symbol */
-sym_dock = 190, /* U dock symbol */
-sym_marina = 191, /* U marina symbol */
-sym_bait_tackle = 192, /* U bait and tackle symbol */
-sym_stump = 193, /* U stump symbol */
-/*---------------------------------------------------------------
-User customizable symbols
-The values from sym_begin_custom to sym_end_custom inclusive are
-reserved for the identification of user customizable symbols.
----------------------------------------------------------------*/
-sym_begin_custom = 7680, /* first user customizable symbol */
-sym_end_custom = 8191, /* last user customizable symbol */
-/*---------------------------------------------------------------
-Land symbols
----------------------------------------------------------------*/
-sym_is_hwy = 8192, /* interstate hwy symbol */
-sym_us_hwy = 8193, /* us hwy symbol */
-sym_st_hwy = 8194, /* state hwy symbol */
-sym_mi_mrkr = 8195, /* mile marker symbol */
-sym_trcbck = 8196, /* TracBack (feet) symbol */
-sym_golf = 8197, /* golf symbol */
-sym_sml_cty = 8198, /* small city symbol */
-sym_med_cty = 8199, /* medium city symbol */
-sym_lrg_cty = 8200, /* large city symbol */
-sym_freeway = 8201, /* intl freeway hwy symbol */
-sym_ntl_hwy = 8202, /* intl national hwy symbol */
-sym_cap_cty = 8203, /* capitol city symbol (star) */
-sym_amuse_pk = 8204, /* amusement park symbol */
-sym_bowling = 8205, /* bowling symbol */
-sym_car_rental = 8206, /* car rental symbol */
-sym_car_repair = 8207, /* car repair symbol */
-sym_fastfood = 8208, /* fast food symbol */
-sym_fitness = 8209, /* fitness symbol */
-sym_movie = 8210, /* movie symbol */
-sym_museum = 8211, /* museum symbol */
-sym_pharmacy = 8212, /* pharmacy symbol */
-sym_pizza = 8213, /* pizza symbol */
-sym_post_ofc = 8214, /* post office symbol */
-sym_rv_park = 8215, /* RV park symbol */
-sym_school = 8216, /* school symbol */
-sym_stadium = 8217, /* stadium symbol */
-sym_store = 8218, /* dept. store symbol */
-sym_zoo = 8219, /* zoo symbol */
-sym_gas_plus = 8220, /* convenience store symbol */
-sym_faces = 8221, /* live theater symbol */
-sym_ramp_int = 8222, /* ramp intersection symbol */
-sym_st_int = 8223, /* street intersection symbol */
-sym_weigh_sttn = 8226, /* inspection/weigh station symbol */
-sym_toll_booth = 8227, /* toll booth symbol */
-sym_elev_pt = 8228, /* elevation point symbol */
-sym_ex_no_srvc = 8229, /* exit without services symbol */
-sym_geo_place_mm = 8230, /* Geographic place name, man-made */
-sym_geo_place_wtr = 8231, /* Geographic place name, water */
-sym_geo_place_lnd = 8232, /* Geographic place name, land */
-sym_bridge = 8233, /* bridge symbol */
-sym_building = 8234, /* building symbol */
-sym_cemetery = 8235, /* cemetery symbol */
-sym_church = 8236, /* church symbol */
-sym_civil = 8237, /* civil location symbol */
-sym_crossing = 8238, /* crossing symbol */
-sym_hist_town = 8239, /* historical town symbol */
-sym_levee = 8240, /* levee symbol */
-sym_military = 8241, /* military location symbol */
-sym_oil_field = 8242, /* oil field symbol */
-sym_tunnel = 8243, /* tunnel symbol */
-sym_beach = 8244, /* beach symbol */
-sym_forest = 8245, /* forest symbol */
-sym_summit = 8246, /* summit symbol */
-sym_lrg_ramp_int = 8247, /* large ramp intersection symbol */
-sym_lrg_ex_no_srvc = 8248, /* large exit without services smbl */
-sym_badge = 8249, /* police/official badge symbol */
-sym_cards = 8250, /* gambling/casino symbol */
-sym_snowski = 8251, /* snow skiing symbol */
-sym_iceskate = 8252, /* ice skating symbol */
-sym_wrecker = 8253, /* tow truck (wrecker) symbol */
-sym_border = 8254, /* border crossing (port of entry) */
-sym_geocache = 8255, /* geocache location */
-sym_geocache_fnd = 8256, /* found geocache */
-sym_cntct_smiley = 8257, /* Rino contact symbol, "smiley" */
-sym_cntct_ball_cap = 8258, /* Rino contact symbol, "ball cap" */
-sym_cntct_big_ears = 8259, /* Rino contact symbol, "big ear" */
-sym_cntct_spike = 8260, /* Rino contact symbol, "spike" */
-sym_cntct_goatee = 8261, /* Rino contact symbol, "goatee" */
-sym_cntct_afro = 8262, /* Rino contact symbol, "afro" */
-sym_cntct_dreads = 8263, /* Rino contact symbol, "dreads" */
-sym_cntct_female1 = 8264, /* Rino contact symbol, "female 1" */
-sym_cntct_female2 = 8265, /* Rino contact symbol, "female 2" */
-sym_cntct_female3 = 8266, /* Rino contact symbol, "female 3" */
-sym_cntct_ranger = 8267, /* Rino contact symbol, "ranger" */
-sym_cntct_kung_fu = 8268, /* Rino contact symbol, "kung fu" */
-sym_cntct_sumo = 8269, /* Rino contact symbol, "sumo" */
-sym_cntct_pirate = 8270, /* Rino contact symbol, "pirate" */
-sym_cntct_biker = 8271, /* Rino contact symbol, "biker" */
-sym_cntct_alien = 8272, /* Rino contact symbol, "alien" */
-sym_cntct_bug = 8273, /* Rino contact symbol, "bug" */
-sym_cntct_cat = 8274, /* Rino contact symbol, "cat" */
-sym_cntct_dog = 8275, /* Rino contact symbol, "dog" */
-sym_cntct_pig = 8276, /* Rino contact symbol, "pig" */
-sym_hydrant = 8282, /* water hydrant symbol */
-sym_flag_blue = 8284, /* blue flag symbol */
-sym_flag_green = 8285, /* green flag symbol */
-sym_flag_red = 8286, /* red flag symbol */
-sym_pin_blue = 8287, /* blue pin symbol */
-sym_pin_green = 8288, /* green pin symbol */
-sym_pin_red = 8289, /* red pin symbol */
-sym_block_blue = 8290, /* blue block symbol */
-sym_block_green = 8291, /* green block symbol */
-sym_block_red = 8292, /* red block symbol */
-sym_bike_trail = 8293, /* bike trail symbol */
-sym_circle_red = 8294, /* red circle symbol */
-sym_circle_green = 8295, /* green circle symbol */
-sym_circle_blue = 8296, /* blue circle symbol */
-sym_diamond_blue = 8299, /* blue diamond symbol */
-sym_oval_red = 8300, /* red oval symbol */
-sym_oval_green = 8301, /* green oval symbol */
-sym_oval_blue = 8302, /* blue oval symbol */
-sym_rect_red = 8303, /* red rectangle symbol */
-sym_rect_green = 8304, /* green rectangle symbol */
-sym_rect_blue = 8305, /* blue rectangle symbol */
-sym_square_blue = 8308, /* blue square symbol */
-sym_letter_a_red = 8309, /* red letter 'A' symbol */
-sym_letter_b_red = 8310, /* red letter 'B' symbol */
-sym_letter_c_red = 8311, /* red letter 'C' symbol */
-sym_letter_d_red = 8312, /* red letter 'D' symbol */
-sym_letter_a_green = 8313, /* green letter 'A' symbol */
-sym_letter_c_green = 8314, /* green letter 'C' symbol */
-sym_letter_b_green = 8315, /* green letter 'B' symbol */
-sym_letter_d_green = 8316, /* green letter 'D' symbol */
-sym_letter_a_blue = 8317, /* blue letter 'A' symbol */
-sym_letter_b_blue = 8318, /* blue letter 'B' symbol */
-sym_letter_c_blue = 8319, /* blue letter 'C' symbol */
-sym_letter_d_blue = 8320, /* blue letter 'D' symbol */
-sym_number_0_red = 8321, /* red number '0' symbol */
-sym_number_1_red = 8322, /* red number '1' symbol */
-sym_number_2_red = 8323, /* red number '2' symbol */
-sym_number_3_red = 8324, /* red number '3' symbol */
-sym_number_4_red = 8325, /* red number '4' symbol */
-sym_number_5_red = 8326, /* red number '5' symbol */
-sym_number_6_red = 8327, /* red number '6' symbol */
-sym_number_7_red = 8328, /* red number '7' symbol */
-sym_number_8_red = 8329, /* red number '8' symbol */
-sym_number_9_red = 8330, /* red number '9' symbol */
-sym_number_0_green = 8331, /* green number '0' symbol */
-sym_number_1_green = 8332, /* green number '1' symbol */
-sym_number_2_green = 8333, /* green number '2' symbol */
-sym_number_3_green = 8334, /* green number '3' symbol */
-sym_number_4_green = 8335, /* green number '4' symbol */
-sym_number_5_green = 8336, /* green number '5' symbol */
-sym_number_6_green = 8337, /* green number '6' symbol */
-sym_number_7_green = 8338, /* green number '7' symbol */
-sym_number_8_green = 8339, /* green number '8' symbol */
-sym_number_9_green = 8340, /* green number '9' symbol */
-sym_number_0_blue = 8341, /* blue number '0' symbol */
-sym_number_1_blue = 8342, /* blue number '1' symbol */
-sym_number_2_blue = 8343, /* blue number '2' symbol */
-sym_number_3_blue = 8344, /* blue number '3' symbol */
-sym_number_4_blue = 8345, /* blue number '4' symbol */
-sym_number_5_blue = 8346, /* blue number '5' symbol */
-sym_number_6_blue = 8347, /* blue number '6' symbol */
-sym_number_7_blue = 8348, /* blue number '7' symbol */
-sym_number_8_blue = 8349, /* blue number '8' symbol */
-sym_number_9_blue = 8350, /* blue number '9' symbol */
-sym_triangle_blue = 8351, /* blue triangle symbol */
-sym_triangle_green = 8352, /* green triangle symbol */
-sym_triangle_red = 8353, /* red triangle symbol */
-sym_food_asian = 8359, /* asian food symbol */
-sym_food_deli = 8360, /* deli symbol */
-sym_food_italian = 8361, /* italian food symbol */
-sym_food_seafood = 8362, /* seafood symbol */
-sym_food_steak = 8363, /* steak symbol */
-/*---------------------------------------------------------------
-Aviation symbols
----------------------------------------------------------------*/
-sym_airport = 16384, /* airport symbol */
-sym_int = 16385, /* intersection symbol */
-sym_ndb = 16386, /* non-directional beacon symbol */
-sym_vor = 16387, /* VHF omni-range symbol */
-sym_heliport = 16388, /* heliport symbol */
-sym_private = 16389, /* private field symbol */
-sym_soft_fld = 16390, /* soft field symbol */
-sym_tall_tower = 16391, /* tall tower symbol */
-sym_short_tower = 16392, /* short tower symbol */
-sym_glider = 16393, /* glider symbol */
-sym_ultralight = 16394, /* ultralight symbol */
-sym_parachute = 16395, /* parachute symbol */
-sym_vortac = 16396, /* VOR/TACAN symbol */
-sym_vordme = 16397, /* VOR-DME symbol */
-sym_faf = 16398, /* first approach fix */
-sym_lom = 16399, /* localizer outer marker */
-sym_map = 16400, /* missed approach point */
-sym_tacan = 16401, /* TACAN symbol */
-sym_seaplane = 16402, /* Seaplane Base */
-};
-
-
-
-/*
- * Mapping from APRS symbols to Garmin.
- */
-
-// TODO: NEEDS MORE WORK!!!
-
-
-#define SYMTAB_SIZE 95
-
-#define sym_default sym_diamond_grn
-
-
-static const symbol_type_t grm_primary_symtab[SYMTAB_SIZE] = {
-
- sym_default, // 00 --no-symbol--
- sym_cntct_ranger, // ! 01 Police, Sheriff
- sym_default, // " 02 reserved (was rain)
- sym_rbcn, // # 03 DIGI (white center)
- sym_phone, // $ 04 PHONE
- sym_rbcn, // % 05 DX CLUSTER
- sym_rbcn, // & 06 HF GATEway
- sym_glider, // ' 07 Small AIRCRAFT
- sym_rbcn, // ( 08 Mobile Satellite Station
- sym_default, // ) 09 Wheelchair (handicapped)
- sym_car, // * 10 SnowMobile
- sym_1st_aid, // + 11 Red Cross
- sym_cntct_ball_cap, // , 12 Boy Scouts
- sym_house, // - 13 House QTH (VHF)
- sym_default, // . 14 X
- sym_default, // / 15 Red Dot
- sym_default, // 0 16 # circle (obsolete)
- sym_default, // 1 17 TBD
- sym_default, // 2 18 TBD
- sym_default, // 3 19 TBD
- sym_default, // 4 20 TBD
- sym_default, // 5 21 TBD
- sym_default, // 6 22 TBD
- sym_default, // 7 23 TBD
- sym_default, // 8 24 TBD
- sym_default, // 9 25 TBD
- sym_default, // : 26 FIRE
- sym_camp, // ; 27 Campground (Portable ops)
- sym_cntct_biker, // < 28 Motorcycle
- sym_default, // = 29 RAILROAD ENGINE
- sym_car, // > 30 CAR
- sym_default, // ? 31 SERVER for Files
- sym_default, // @ 32 HC FUTURE predict (dot)
- sym_1st_aid, // A 33 Aid Station
- sym_rbcn, // B 34 BBS or PBBS
- sym_boat_ramp, // C 35 Canoe
- sym_default, // D 36
- sym_default, // E 37 EYEBALL (Eye catcher!)
- sym_default, // F 38 Farm Vehicle (tractor)
- sym_default, // G 39 Grid Square (6 digit)
- sym_lodging, // H 40 HOTEL (blue bed symbol)
- sym_rbcn, // I 41 TcpIp on air network stn
- sym_default, // J 42
- sym_school, // K 43 School
- sym_default, // L 44 PC user
- sym_default, // M 45 MacAPRS
- sym_default, // N 46 NTS Station
- sym_parachute, // O 47 BALLOON
- sym_cntct_ranger, // P 48 Police
- sym_default, // Q 49 TBD
- sym_rv_park, // R 50 REC. VEHICLE
- sym_glider, // S 51 SHUTTLE
- sym_default, // T 52 SSTV
- sym_car, // U 53 BUS
- sym_cntct_biker, // V 54 ATV
- sym_default, // W 55 National WX Service Site
- sym_default, // X 56 HELO
- sym_default, // Y 57 YACHT (sail)
- sym_default, // Z 58 WinAPRS
- sym_cntct_smiley, // [ 59 Human/Person (HT)
- sym_triangle_green, // \ 60 TRIANGLE(DF station)
- sym_default, // ] 61 MAIL/PostOffice(was PBBS)
- sym_glider, // ^ 62 LARGE AIRCRAFT
- sym_default, // _ 63 WEATHER Station (blue)
- sym_rbcn, // ` 64 Dish Antenna
- sym_1st_aid, // a 65 AMBULANCE
- sym_cntct_biker, // b 66 BIKE
- sym_default, // c 67 Incident Command Post
- sym_hydrant, // d 68 Fire dept
- sym_deer, // e 69 HORSE (equestrian)
- sym_hydrant, // f 70 FIRE TRUCK
- sym_glider, // g 71 Glider
- sym_1st_aid, // h 72 HOSPITAL
- sym_default, // i 73 IOTA (islands on the air)
- sym_car, // j 74 JEEP
- sym_car, // k 75 TRUCK
- sym_default, // l 76 Laptop
- sym_rbcn, // m 77 Mic-E Repeater
- sym_default, // n 78 Node (black bulls-eye)
- sym_default, // o 79 EOC
- sym_cntct_dog, // p 80 ROVER (puppy, or dog)
- sym_default, // q 81 GRID SQ shown above 128 m
- sym_rbcn, // r 82 Repeater
- sym_default, // s 83 SHIP (pwr boat)
- sym_truck_stop, // t 84 TRUCK STOP
- sym_truck_stop, // u 85 TRUCK (18 wheeler)
- sym_car, // v 86 VAN
- sym_drinking_wtr, // w 87 WATER station
- sym_default, // x 88 xAPRS (Unix)
- sym_tall_tower, // y 89 YAGI @ QTH
- sym_default, // z 90 TBD
- sym_default, // { 91
- sym_default, // | 92 TNC Stream Switch
- sym_default, // } 93
- sym_default }; // ~ 94 TNC Stream Switch
-
-static const symbol_type_t grm_alternate_symtab[SYMTAB_SIZE] = {
-
- sym_default, // 00 --no-symbol--
- sym_default, // ! 01 EMERGENCY (!)
- sym_default, // " 02 reserved
- sym_default, // # 03 OVERLAY DIGI (green star)
- sym_default, // $ 04 Bank or ATM (green box)
- sym_default, // % 05 Power Plant with overlay
- sym_rbcn, // & 06 I=Igte IGate R=RX T=1hopTX 2=2hopTX
- sym_default, // ' 07 Crash (& now Incident sites)
- sym_default, // ( 08 CLOUDY (other clouds w ovrly)
- sym_hydrant, // ) 09 Firenet MEO, MODIS Earth Obs.
- sym_default, // * 10 SNOW (& future ovrly codes)
- sym_default, // + 11 Church
- sym_cntct_female1, // , 12 Girl Scouts
- sym_house, // - 13 House (H=HF) (O = Op Present)
- sym_default, // . 14 Ambiguous (Big Question mark)
- sym_default, // / 15 Waypoint Destination
- sym_default, // 0 16 CIRCLE (E/I/W=IRLP/Echolink/WIRES)
- sym_default, // 1 17
- sym_default, // 2 18
- sym_default, // 3 19
- sym_default, // 4 20
- sym_default, // 5 21
- sym_default, // 6 22
- sym_default, // 7 23
- sym_default, // 8 24 802.11 or other network node
- sym_default, // 9 25 Gas Station (blue pump)
- sym_default, // : 26 Hail (& future ovrly codes)
- sym_park, // ; 27 Park/Picnic area
- sym_default, // < 28 ADVISORY (one WX flag)
- sym_rbcn, // = 29 APRStt Touchtone (DTMF users)
- sym_car, // > 30 OVERLAID CAR
- sym_default, // ? 31 INFO Kiosk (Blue box with ?)
- sym_default, // @ 32 HURRICANE/Trop-Storm
- sym_default, // A 33 overlayBOX DTMF & RFID & XO
- sym_default, // B 34 Blwng Snow (& future codes)
- sym_coast_guard, // C 35 Coast Guard
- sym_default, // D 36 Drizzle (proposed APRStt)
- sym_default, // E 37 Smoke (& other vis codes)
- sym_default, // F 38 Freezng rain (&future codes)
- sym_default, // G 39 Snow Shwr (& future ovrlys)
- sym_default, // H 40 Haze (& Overlay Hazards)
- sym_default, // I 41 Rain Shower
- sym_default, // J 42 Lightning (& future ovrlys)
- sym_rbcn, // K 43 Kenwood HT (W)
- sym_light, // L 44 Lighthouse
- sym_default, // M 45 MARS (A=Army,N=Navy,F=AF)
- sym_default, // N 46 Navigation Buoy
- sym_default, // O 47 Rocket
- sym_default, // P 48 Parking
- sym_default, // Q 49 QUAKE
- sym_default, // R 50 Restaurant
- sym_rbcn, // S 51 Satellite/Pacsat
- sym_default, // T 52 Thunderstorm
- sym_default, // U 53 SUNNY
- sym_default, // V 54 VORTAC Nav Aid
- sym_default, // W 55 # NWS site (NWS options)
- sym_pharmacy, // X 56 Pharmacy Rx (Apothicary)
- sym_rbcn, // Y 57 Radios and devices
- sym_default, // Z 58
- sym_default, // [ 59 W.Cloud (& humans w Ovrly)
- sym_default, // \ 60 New overlayable GPS symbol
- sym_default, // ] 61
- sym_glider, // ^ 62 # Aircraft (shows heading)
- sym_default, // _ 63 # WX site (green digi)
- sym_default, // ` 64 Rain (all types w ovrly)
- sym_default, // a 65 ARRL, ARES, WinLINK
- sym_default, // b 66 Blwng Dst/Snd (& others)
- sym_default, // c 67 CD triangle RACES/SATERN/etc
- sym_default, // d 68 DX spot by callsign
- sym_default, // e 69 Sleet (& future ovrly codes)
- sym_default, // f 70 Funnel Cloud
- sym_default, // g 71 Gale Flags
- sym_default, // h 72 Store. or HAMFST Hh=HAM store
- sym_default, // i 73 BOX or points of Interest
- sym_default, // j 74 WorkZone (Steam Shovel)
- sym_car, // k 75 Special Vehicle SUV,ATV,4x4
- sym_default, // l 76 Areas (box,circles,etc)
- sym_default, // m 77 Value Sign (3 digit display)
- sym_default, // n 78 OVERLAY TRIANGLE
- sym_default, // o 79 small circle
- sym_default, // p 80 Prtly Cldy (& future ovrlys)
- sym_default, // q 81
- sym_restrooms, // r 82 Restrooms
- sym_default, // s 83 OVERLAY SHIP/boat (top view)
- sym_default, // t 84 Tornado
- sym_car, // u 85 OVERLAID TRUCK
- sym_car, // v 86 OVERLAID Van
- sym_default, // w 87 Flooding
- sym_wreck, // x 88 Wreck or Obstruction ->X<-
- sym_default, // y 89 Skywarn
- sym_default, // z 90 OVERLAID Shelter
- sym_default, // { 91 Fog (& future ovrly codes)
- sym_default, // | 92 TNC Stream Switch
- sym_default, // } 93
- sym_default }; // ~ 94 TNC Stream Switch
-
diff --git a/hdlc_send.h b/hdlc_send.h
deleted file mode 100644
index 4f8a105..0000000
--- a/hdlc_send.h
+++ /dev/null
@@ -1,17 +0,0 @@
-
-/* hdlc_send.h */
-
-// In version 1.7 an extra layer of abstraction was added here.
-// Rather than calling hdlc_send_frame, we now use another function
-// which sends AX.25, FX.25, or IL2P depending on
-
-#include "ax25_pad.h"
-#include "audio.h"
-
-int layer2_send_frame (int chan, packet_t pp, int bad_fcs, struct audio_s *audio_config_p);
-
-int layer2_preamble_postamble (int chan, int flags, int finish, struct audio_s *audio_config_p);
-
-/* end hdlc_send.h */
-
-
diff --git a/igate.h b/igate.h
deleted file mode 100644
index 8203ac7..0000000
--- a/igate.h
+++ /dev/null
@@ -1,128 +0,0 @@
-
-/*----------------------------------------------------------------------------
- *
- * Name: igate.h
- *
- * Purpose: Interface to the Internet Gateway functions.
- *
- *-----------------------------------------------------------------------------*/
-
-
-#ifndef IGATE_H
-#define IGATE_H 1
-
-
-#include "ax25_pad.h"
-#include "digipeater.h"
-#include "audio.h"
-
-
-#define DEFAULT_IGATE_PORT 14580
-
-
-
-struct igate_config_s {
-
-/*
- * For logging into the IGate server.
- */
- char t2_server_name[40]; /* Tier 2 IGate server name. */
-
- int t2_server_port; /* Typically 14580. */
-
- char t2_login[AX25_MAX_ADDR_LEN];/* e.g. WA9XYZ-15 */
- /* Note that the ssid could be any two alphanumeric */
- /* characters not just 1 thru 15. */
- /* Could be same or different than the radio call(s). */
- /* Not sure what the consequences would be. */
-
- char t2_passcode[8]; /* Max. 5 digits. Could be "-1". */
-
- char *t2_filter; /* Optional filter for IS -> RF direction. */
- /* This is the "server side" filter. */
- /* A better name would be subscription or something */
- /* like that because we can only ask for more. */
-
-/*
- * For transmitting.
- */
- int tx_chan; /* Radio channel for transmitting. */
- /* 0=first, etc. -1 for none. */
- /* Presently IGate can transmit on only a single channel. */
- /* A future version might generalize this. */
- /* Each transmit channel would have its own client side filtering. */
-
- char tx_via[80]; /* VIA path for transmitting third party packets. */
- /* Usual text representation. */
- /* Must start with "," if not empty so it can */
- /* simply be inserted after the destination address. */
-
- int max_digi_hops; /* Maximum number of digipeater hops possible for via path. */
- /* Derived from the SSID when last character of address is a digit. */
- /* e.g. "WIDE1-1,WIDE5-2" would be 3. */
- /* This is useful to know so we can determine how many */
- /* stations we might be able to reach. */
-
- int tx_limit_1; /* Max. packets to transmit in 1 minute. */
-
- int tx_limit_5; /* Max. packets to transmit in 5 minutes. */
-
- int igmsp; /* Number of message sender position reports to allow. */
- /* Common practice is to default to 1. */
- /* We allow additional flexibility of 0 to disable feature */
- /* or a small number to allow more. */
-
-/*
- * Receiver to IS data options.
- */
- int rx2ig_dedupe_time; /* seconds. 0 to disable. */
-
-/*
- * Special SATgate mode to delay packets heard directly.
- */
- int satgate_delay; /* seconds. 0 to disable. */
-};
-
-
-#define IGATE_TX_LIMIT_1_DEFAULT 6
-#define IGATE_TX_LIMIT_1_MAX 20
-
-#define IGATE_TX_LIMIT_5_DEFAULT 20
-#define IGATE_TX_LIMIT_5_MAX 80
-
-#define IGATE_RX2IG_DEDUPE_TIME 0 /* Issue 85. 0 means disable dupe checking in RF>IS direction. */
- /* See comments in rx_to_ig_remember & rx_to_ig_allow. */
- /* Currently there is no configuration setting to change this. */
-
-#define DEFAULT_SATGATE_DELAY 10
-#define MIN_SATGATE_DELAY 5
-#define MAX_SATGATE_DELAY 30
-
-
-/* Call this once at startup */
-
-void igate_init (struct audio_s *p_audio_config, struct igate_config_s *p_igate_config, struct digi_config_s *p_digi_config, int debug_level);
-
-/* Call this with each packet received from the radio. */
-
-void igate_send_rec_packet (int chan, packet_t recv_pp);
-
-/* This when digipeater transmits. Set bydigi to 1 . */
-
-void ig_to_tx_remember (packet_t pp, int chan, int bydigi);
-
-
-
-/* Get statistics for IGATE status beacon. */
-
-int igate_get_msg_cnt (void);
-
-int igate_get_pkt_cnt (void);
-
-int igate_get_upl_cnt (void);
-
-int igate_get_dnl_cnt (void);
-
-
-
-#endif
diff --git a/il2p.c b/il2p.c
index e51264c..6a284f2 100644
--- a/il2p.c
+++ b/il2p.c
@@ -42,11 +42,44 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
// IP2P receive code (il2p_rec_bit) is called from the bit receiving code in ax25_demod.c, so includes parallel decoders
-
-
-
#include "UZ7HOStuff.h"
+#include // for uint64_t
+
+ // Oct 2023 Nino has added an optional crc
+
+// Hamming(7,4) Encoding Table
+// Enter this table with the 4-bit value to be encoded.
+// Returns 7-bit encoded value, with high bit zero'd.
+
+uint8_t Hamming74EncodeTable[16] = { 0x0, 0x71, 0x62, 0x13, 0x54, 0x25, 0x36, 0x47, 0x38, 0x49, 0x5a, 0x2b, 0x6c, 0x1d, 0xe, 0x7f };
+
+// Hamming(7,4) Decoding Table
+// Enter this table with 7-bit encoded value, high bit masked.
+// Returns 4-bit decoded value.
+
+uint16_t Hamming74DecodeTable[128] = { \
+ 0x0, 0x0, 0x0, 0x3, 0x0, 0x5, 0xe, 0x7, \
+ 0x0, 0x9, 0xe, 0xb, 0xe, 0xd, 0xe, 0xe, \
+ 0x0, 0x3, 0x3, 0x3, 0x4, 0xd, 0x6, 0x3, \
+ 0x8, 0xd, 0xa, 0x3, 0xd, 0xd, 0xe, 0xd, \
+ 0x0, 0x5, 0x2, 0xb, 0x5, 0x5, 0x6, 0x5, \
+ 0x8, 0xb, 0xb, 0xb, 0xc, 0x5, 0xe, 0xb, \
+ 0x8, 0x1, 0x6, 0x3, 0x6, 0x5, 0x6, 0x6, \
+ 0x8, 0x8, 0x8, 0xb, 0x8, 0xd, 0x6, 0xf, \
+ 0x0, 0x9, 0x2, 0x7, 0x4, 0x7, 0x7, 0x7, \
+ 0x9, 0x9, 0xa, 0x9, 0xc, 0x9, 0xe, 0x7, \
+ 0x4, 0x1, 0xa, 0x3, 0x4, 0x4, 0x4, 0x7, \
+ 0xa, 0x9, 0xa, 0xa, 0x4, 0xd, 0xa, 0xf, \
+ 0x2, 0x1, 0x2, 0x2, 0xc, 0x5, 0x2, 0x7, \
+ 0xc, 0x9, 0x2, 0xb, 0xc, 0xc, 0xc, 0xf, \
+ 0x1, 0x1, 0x2, 0x1, 0x4, 0x1, 0x6, 0xf, \
+ 0x8, 0x1, 0xa, 0xf, 0xc, 0xf, 0xf, 0xf };
+
+
+
+
+
void Debugprintf(const char * format, ...);
int SMUpdatePhaseConstellation(int chan, float * Phases, float * Mags, int intPSKPhase, int Count);
@@ -109,7 +142,6 @@ int MaxMagIndex = 0;
#ifndef FX25_H
#define FX25_H
-#include // for uint64_t
extern unsigned int pskStates[4];
@@ -343,6 +375,7 @@ struct packet_s {
unsigned char frame_data[AX25_MAX_PACKET_LEN + 1];
/* Raw frame contents, without the CRC. */
+ unsigned char crc[4]; // received crc
int magic2; /* Will get stomped on if above overflows. */
};
@@ -1015,6 +1048,39 @@ void multi_modem_process_rec_packet(int snd_ch, int subchan, int slice, packet_t
sprintf(Mode, "IL2P %d", centreFreq);
+ // check crc if enabled
+
+ if (il2p_crc[snd_ch])
+ {
+ unsigned short CRCMSG;
+ unsigned short CRCCALC;
+ uint8_t crc[4];
+
+ // check crc if enabled
+
+ // The four encoded CRC bytes are arranged :
+ // | CRC3 | CRC2 | CRC1 | CRC0 | but we store as received, so F->crc[0] is CRC3
+ // CRC3 encoded from high nibble of 16 - bit CRC value (from crc2)
+ // CRC0 encoded from low nibble of 16 - bit CRC value (from crc1)
+
+ crc[0] = Hamming74DecodeTable[(pp->crc[0] & 0x7f)];
+ crc[1] = Hamming74DecodeTable[(pp->crc[1] & 0x7f)];
+ crc[2] = Hamming74DecodeTable[(pp->crc[2] & 0x7f)];
+ crc[3] = Hamming74DecodeTable[(pp->crc[3] & 0x7f)];
+
+ CRCMSG = crc[0] << 12 | crc[1] << 8 | crc[2] << 4 | crc[3];
+
+ CRCCALC = get_fcs(pp->frame_data, pp->frame_len);
+
+ if (CRCCALC != CRCMSG)
+ {
+ Debugprintf("CRC Error Decoder %d Received %x Sent %x", subchan, CRCCALC, CRCMSG);
+ // freeString(data);
+ // ax25_delete(pp);
+ // return;
+ }
+ }
+
stringAdd(data, pp->frame_data, pp->frame_len + 2); // QTSM assumes a CRC
ax25_delete(pp);
@@ -3151,6 +3217,13 @@ int il2p_type_1_header(packet_t pp, int max_fec, unsigned char *hdr)
ax25_get_addr_no_ssid(pp, AX25_SOURCE, src_addr);
int src_ssid = ax25_get_ssid(pp, AX25_SOURCE);
+ if ((pp->frame_data[6] & 0x80) == (pp->frame_data[13] & 0x80))
+ {
+ // Both C bits are the same (ax.25 v1) so can't be sent as type 1 as will be changed
+
+ return -1;
+ }
+
unsigned char *a = (unsigned char *)dst_addr;
for (int i = 0; *a != '\0'; i++, a++) {
if (*a < ' ' || *a > '_') {
@@ -3919,7 +3992,7 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
//assert(slice >= 0 && slice < MAX_SLICERS);
F = il2p_context[chan][subchan][slice] = (struct il2p_context_s *)malloc(sizeof(struct il2p_context_s));
//assert(F != NULL);
- memset(F, 0, sizeof(struct il2p_context_s));
+memset(F, 0, sizeof(struct il2p_context_s));
}
// Accumulate most recent 24 bits received. Most recent is LSB.
@@ -3942,7 +4015,7 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
nPhases[chan][subchan][slice] = 0;
// Determine Centre Freq
-
+
centreFreq[chan] = GuessCentreFreq(chan);
}
else if (__builtin_popcount((~F->acc & 0x00ffffff) ^ IL2P_SYNC_WORD) <= 1) {
@@ -3956,7 +4029,7 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
centreFreq[chan] = GuessCentreFreq(chan);
nPhases[chan][subchan][slice] = 0;
}
-
+
break;
case IL2P_HEADER: // Gathering the header.
@@ -3990,7 +4063,7 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
F->eplen = il2p_payload_compute(&plprop, len, max_fec);
if (il2p_get_debug() >= 1)
- {
+ {
Debugprintf("Header type %d, max fec = %d", hdr_type, max_fec);
Debugprintf("Need to collect %d encoded bytes for %d byte payload.", F->eplen, len);
Debugprintf("%d small blocks of %d and %d large blocks of %d. %d parity symbols per block",
@@ -4008,9 +4081,21 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
F->pc = 0;
F->state = IL2P_PAYLOAD;
}
- else if (F->eplen == 0) { // No payload.
+ else if (F->eplen == 0)
+ {
+ // No payload.
+
F->pc = 0;
- F->state = IL2P_DECODE;
+
+ if (il2p_crc[chan])
+ {
+ // enter collect crc state
+
+ F->crccount = 0;
+ F->state = IL2P_CRC;
+ }
+ else
+ F->state = IL2P_DECODE;
}
else { // Error.
@@ -4039,16 +4124,47 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
else {
F->spayload[F->pc++] = (~F->acc) & 0xff;
}
- if (F->pc == F->eplen) {
+ if (F->pc == F->eplen)
+ {
+ // got frame. See if need crc
- // TODO?: for symmetry it seems like we should clarify the payload before combining.
+ if (il2p_crc[chan])
+ {
+ // enter collect crc state
- F->state = IL2P_DECODE;
+ F->crccount = 0;
+ F->state = IL2P_CRC;
+ }
+ else
+ F->state = IL2P_DECODE;
}
}
break;
+ case IL2P_CRC:
+
+ F->bc++;
+ if (F->bc == 8)
+ {
+ // full byte has been collected.
+ F->bc = 0;
+ if (!F->polarity)
+ F->crc[F->crccount++] = F->acc & 0xff;
+ else
+ F->crc[F->crccount++] = (~F->acc) & 0xff;
+
+ if (F->crccount == 4)
+ {
+ // have all crc bytes. enter DECODE
+
+ F->state = IL2P_DECODE;
+ }
+ }
+
+ break;
+
case IL2P_DECODE:
+
// We get here after a good header and any payload has been collected.
// Processing is delayed by one bit but I think it makes the logic cleaner.
// During unit testing be sure to send an extra bit to flush it out at the end.
@@ -4077,6 +4193,18 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
// TODO: Could we put last 3 arguments in packet object rather than passing around separately?
+ // if using crc pass received crc to packet object
+
+ if (il2p_crc[chan])
+ {
+ //copy crc bytes to packet object
+
+ pp->crc[0] = F->crc[0];
+ pp->crc[1] = F->crc[1];
+ pp->crc[2] = F->crc[2];
+ pp->crc[3] = F->crc[3];
+ }
+
multi_modem_process_rec_packet(chan, subchan, slice, pp, alevel, retries, is_fx25, slice, centreFreq[chan]);
}
} // end block for local variables.
@@ -4269,13 +4397,19 @@ static void send_bit(int chan, int b, int polarity);
*
*--------------------------------------------------------------*/
+
string * il2p_send_frame(int chan, packet_t pp, int max_fec, int polarity)
{
- unsigned char encoded[IL2P_MAX_PACKET_SIZE];
+ unsigned char encoded[IL2P_MAX_PACKET_SIZE] = "";
string * packet = newString();
int preamblecount;
unsigned char preamble[1024];
+ // The data includes the 2 byte crc but length doesn't
+
+ uint8_t crc1 = pp->frame_data[pp->frame_len]; // Low 8 bits
+ uint8_t crc2 = pp->frame_data[pp->frame_len + 1]; // High 8 bits
+
encoded[0] = (IL2P_SYNC_WORD >> 16) & 0xff;
encoded[1] = (IL2P_SYNC_WORD >> 8) & 0xff;
encoded[2] = (IL2P_SYNC_WORD) & 0xff;
@@ -4289,6 +4423,24 @@ string * il2p_send_frame(int chan, packet_t pp, int max_fec, int polarity)
elen += IL2P_SYNC_WORD_SIZE;
+ // if we are using crc add it now. elen should point to end of data
+ // crc should be at pp->frame_data[pp->frame_len]
+
+ if (il2p_crc[chan])
+ {
+ // The four encoded CRC bytes are arranged :
+ // | CRC3 | CRC2 | CRC1 | CRC0 |
+
+ // CRC3 encoded from high nibble of 16 - bit CRC value (from crc2)
+ // CRC0 encoded from low nibble of 16 - bit CRC value (from crc1)
+
+ encoded[elen++] = Hamming74EncodeTable[crc2 >> 4];
+ encoded[elen++] = Hamming74EncodeTable[crc2 & 0xf];
+ encoded[elen++] = Hamming74EncodeTable[crc1 >> 4];
+ encoded[elen++] = Hamming74EncodeTable[crc1 &0xf];
+ }
+
+
number_of_bits_sent[chan] = 0;
if (il2p_get_debug() >= 1) {
@@ -4366,7 +4518,7 @@ string * fill_il2p_data(int snd_ch, string * data)
// Call il2p_send_frame to build the bit stream
pp->frame_len = data->Length - 2; // Included CRC
- memcpy(pp->frame_data, data->Data, data->Length);
+ memcpy(pp->frame_data, data->Data, data->Length); // Copy the crc in case we are going to send it
result = il2p_send_frame(snd_ch, pp, 1, 0);
diff --git a/kiss.h b/kiss.h
deleted file mode 100644
index 1dc40da..0000000
--- a/kiss.h
+++ /dev/null
@@ -1,24 +0,0 @@
-
-/*
- * Name: kiss.h
- *
- * This is for the pseudo terminal KISS interface.
- */
-
-
-#include "ax25_pad.h" /* for packet_t */
-
-#include "config.h"
-
-#include "kiss_frame.h" // for struct kissport_status_s
-
-
-void kisspt_init (struct misc_config_s *misc_config);
-
-void kisspt_send_rec_packet (int chan, int kiss_cmd, unsigned char *fbuf, int flen,
- struct kissport_status_s *notused1, int notused2);
-
-void kisspt_set_debug (int n);
-
-
-/* end kiss.h */
diff --git a/kiss_frame.h b/kiss_frame.h
deleted file mode 100644
index 941f5c0..0000000
--- a/kiss_frame.h
+++ /dev/null
@@ -1,126 +0,0 @@
-
-/* kiss_frame.h */
-
-#ifndef KISS_FRAME_H
-#define KISS_FRAME_H
-
-
-#include "audio.h" /* for struct audio_s */
-
-
-/*
- * The first byte of a KISS frame has:
- * channel in upper nybble.
- * command in lower nybble.
- */
-
-#define KISS_CMD_DATA_FRAME 0
-#define KISS_CMD_TXDELAY 1
-#define KISS_CMD_PERSISTENCE 2
-#define KISS_CMD_SLOTTIME 3
-#define KISS_CMD_TXTAIL 4
-#define KISS_CMD_FULLDUPLEX 5
-#define KISS_CMD_SET_HARDWARE 6
-#define XKISS_CMD_DATA 12 // Not supported. http://he.fi/pub/oh7lzb/bpq/multi-kiss.pdf
-#define XKISS_CMD_POLL 14 // Not supported.
-#define KISS_CMD_END_KISS 15
-
-
-
-/*
- * Special characters used by SLIP protocol.
- */
-
-#define FEND 0xC0
-#define FESC 0xDB
-#define TFEND 0xDC
-#define TFESC 0xDD
-
-
-
-enum kiss_state_e {
- KS_SEARCHING = 0, /* Looking for FEND to start KISS frame. */
- /* Must be 0 so we can simply zero whole structure to initialize. */
- KS_COLLECTING}; /* In process of collecting KISS frame. */
-
-
-#define MAX_KISS_LEN 2048 /* Spec calls for at least 1024. */
- /* Might want to make it longer to accommodate */
- /* maximum packet length. */
-
-#define MAX_NOISE_LEN 100
-
-typedef struct kiss_frame_s {
-
- enum kiss_state_e state;
-
- unsigned char kiss_msg[MAX_KISS_LEN];
- /* Leading FEND is optional. */
- /* Contains escapes and ending FEND. */
- int kiss_len;
-
- unsigned char noise[MAX_NOISE_LEN];
- int noise_len;
-
-} kiss_frame_t;
-
-
-// This is used only for TCPKISS but it put in kissnet.h,
-// there would be a circular dependency between the two header files.
-// Each KISS TCP port has its own status block.
-
-struct kissport_status_s {
-
- struct kissport_status_s *pnext; // To next in list.
-
- volatile int arg2; // temp for passing second arg into
- // kissnet_listen_thread
-
- int tcp_port; // default 8001
-
- int chan; // Radio channel for this tcp port.
- // -1 for all.
-
- // The default is a limit of 3 client applications at the same time.
- // You can increase the limit by changing the line below.
- // A larger number consumes more resources so don't go crazy by making it larger than needed.
- // TODO: Should this be moved to direwolf.h so max number of audio devices
- // client apps are in the same place?
-
-#define MAX_NET_CLIENTS 3
-
- int client_sock[MAX_NET_CLIENTS];
- /* File descriptor for socket for */
- /* communication with client application. */
- /* Set to -1 if not connected. */
- /* (Don't use SOCKET type because it is unsigned.) */
-
- kiss_frame_t kf[MAX_NET_CLIENTS];
- /* Accumulated KISS frame and state of decoder. */
-};
-
-
-
-#ifndef KISSUTIL
-void kiss_frame_init (struct audio_s *pa);
-#endif
-
-int kiss_encapsulate (unsigned char *in, int ilen, unsigned char *out);
-
-int kiss_unwrap (unsigned char *in, int ilen, unsigned char *out);
-
-void kiss_rec_byte (kiss_frame_t *kf, unsigned char ch, int debug, struct kissport_status_s *kps, int client,
- void (*sendfun)(int chan, int kiss_cmd, unsigned char *fbuf, int flen, struct kissport_status_s *onlykps, int onlyclient));
-
-typedef enum fromto_e { FROM_CLIENT=0, TO_CLIENT=1 } fromto_t;
-
-void kiss_process_msg (unsigned char *kiss_msg, int kiss_len, int debug, struct kissport_status_s *kps, int client,
- void (*sendfun)(int chan, int kiss_cmd, unsigned char *fbuf, int flen, struct kissport_status_s *onlykps, int onlyclient));
-
-void kiss_debug_print (fromto_t fromto, char *special, unsigned char *pmsg, int msg_len);
-
-
-#endif // KISS_FRAME_H
-
-
-/* end kiss_frame.h */
diff --git a/kiss_mode.c b/kiss_mode.c
index 5adba5d..72688a7 100644
--- a/kiss_mode.c
+++ b/kiss_mode.c
@@ -245,7 +245,6 @@ void ProcessKISSFrame(void * socket, UCHAR * Msg, int Len)
Add(&KISS.buffer[Chan], TXMSG);
}
-
return;
case KISS_DATA:
diff --git a/kissnet.h b/kissnet.h
deleted file mode 100644
index 469e4e6..0000000
--- a/kissnet.h
+++ /dev/null
@@ -1,29 +0,0 @@
-
-/*
- * Name: kissnet.h
- */
-
-#ifndef KISSNET_H
-#define KISSNET_H
-
-#include "ax25_pad.h" /* for packet_t */
-
-#include "config.h"
-
-#include "kiss_frame.h"
-
-
-
-void kissnet_init (struct misc_config_s *misc_config);
-
-void kissnet_send_rec_packet (int chan, int kiss_cmd, unsigned char *fbuf, int flen,
- struct kissport_status_s *onlykps, int onlyclient);
-
-void kiss_net_set_debug (int n);
-
-void kissnet_copy (unsigned char *kiss_msg, int kiss_len, int chan, int cmd, struct kissport_status_s *from_kps, int from_client);
-
-
-#endif // KISSNET_H
-
-/* end kissnet.h */
diff --git a/kissserial.h b/kissserial.h
deleted file mode 100644
index 44fb3c3..0000000
--- a/kissserial.h
+++ /dev/null
@@ -1,23 +0,0 @@
-
-/*
- * Name: kissserial.h
- */
-
-
-#include "ax25_pad.h" /* for packet_t */
-
-#include "config.h"
-
-#include "kiss_frame.h"
-
-
-void kissserial_init (struct misc_config_s *misc_config);
-
-void kissserial_send_rec_packet (int chan, int kiss_cmd, unsigned char *fbuf, int flen,
- struct kissport_status_s *notused1, int notused2);
-
-
-void kissserial_set_debug (int n);
-
-
-/* end kissserial.h */
diff --git a/latlong.h b/latlong.h
deleted file mode 100644
index ae98fe6..0000000
--- a/latlong.h
+++ /dev/null
@@ -1,24 +0,0 @@
-
-/* latlong.h */
-
-
-/* Use this value for unknown latitude/longitude or other values. */
-
-#define G_UNKNOWN (-999999)
-
-
-void latitude_to_str (double dlat, int ambiguity, char *slat);
-void longitude_to_str (double dlong, int ambiguity, char *slong);
-
-void latitude_to_comp_str (double dlat, char *clat);
-void longitude_to_comp_str (double dlon, char *clon);
-
-void latitude_to_nmea (double dlat, char *slat, char *hemi);
-void longitude_to_nmea (double dlong, char *slong, char *hemi);
-
-double latitude_from_nmea (char *pstr, char *phemi);
-double longitude_from_nmea (char *pstr, char *phemi);
-
-double ll_distance_km (double lat1, double lon1, double lat2, double lon2);
-
-int ll_from_grid_square (char *maidenhead, double *dlat, double *dlon);
\ No newline at end of file
diff --git a/log.h b/log.h
deleted file mode 100644
index 3afb6b1..0000000
--- a/log.h
+++ /dev/null
@@ -1,19 +0,0 @@
-
-/* log.h */
-
-
-#include "hdlc_rec2.h" // for retry_t
-
-#include "decode_aprs.h" // for decode_aprs_t
-
-#include "ax25_pad.h"
-
-
-
-void log_init (int daily_names, char *path);
-
-void log_write (int chan, decode_aprs_t *A, packet_t pp, alevel_t alevel, retry_t retries);
-
-void log_rr_bits (decode_aprs_t *A, packet_t pp);
-
-void log_term (void);
\ No newline at end of file
diff --git a/main.cpp b/main.cpp
index 402e849..43ea7cd 100644
--- a/main.cpp
+++ b/main.cpp
@@ -53,6 +53,8 @@ int main(int argc, char *argv[])
qDebug() << Title;
+
+
if (nonGUIMode)
a = new QCoreApplication(argc, argv);
else
@@ -60,6 +62,7 @@ int main(int argc, char *argv[])
getSettings();
+
t = new workerThread;
if (nonGUIMode == 0)
@@ -85,4 +88,3 @@ int main(int argc, char *argv[])
}
-
diff --git a/mgn_icon.h b/mgn_icon.h
deleted file mode 100644
index c870bc0..0000000
--- a/mgn_icon.h
+++ /dev/null
@@ -1,276 +0,0 @@
-
-
-/*
- * MGN_icon.h
- *
- * Waypoint icon codes for use in the $PMGNWPL sentence.
- *
- * Derived from Data Transmission Protocol For Magellan Products - version 2.11, March 2003
- *
- * http://www.gpsinformation.org/mag-proto-2-11.pdf
- *
- *
- * That's 13 years ago. There should be something newer available but I can't find it.
- *
- * The is based on the newer models at the time. Earlier models had shorter incompatible icon lists.
- */
-
-
-
-#define MGN_crossed_square "a"
-#define MGN_box "b"
-#define MGN_house "c"
-#define MGN_aerial "d"
-#define MGN_airport "e"
-#define MGN_amusement_park "f"
-#define MGN_ATM "g"
-#define MGN_auto_repair "h"
-#define MGN_boating "I"
-#define MGN_camping "j"
-#define MGN_exit_ramp "k"
-#define MGN_first_aid "l"
-#define MGN_nav_aid "m"
-#define MGN_buoy "n"
-#define MGN_fuel "o"
-#define MGN_garden "p"
-#define MGN_golf "q"
-#define MGN_hotel "r"
-#define MGN_hunting_fishing "s"
-#define MGN_large_city "t"
-#define MGN_lighthouse "u"
-#define MGN_major_city "v"
-#define MGN_marina "w"
-#define MGN_medium_city "x"
-#define MGN_museum "y"
-#define MGN_obstruction "z"
-#define MGN_park "aa"
-#define MGN_resort "ab"
-#define MGN_restaurant "ac"
-#define MGN_rock "ad"
-#define MGN_scuba "ae"
-#define MGN_RV_service "af"
-#define MGN_shooting "ag"
-#define MGN_sight_seeing "ah"
-#define MGN_small_city "ai"
-#define MGN_sounding "aj"
-#define MGN_sports_arena "ak"
-#define MGN_tourist_info "al"
-#define MGN_truck_service "am"
-#define MGN_winery "an"
-#define MGN_wreck "ao"
-#define MGN_zoo "ap"
-
-
-/*
- * Mapping from APRS symbols to Magellan.
- *
- * This is a bit of a challenge because there
- * are no icons for moving objects.
- * We can use airport for flying things but
- * what about wheeled transportation devices?
- */
-
-// TODO: NEEDS MORE WORK!!!
-
-
-#define MGN_default MGN_crossed_square
-
-#define SYMTAB_SIZE 95
-
-static const char mgn_primary_symtab[SYMTAB_SIZE][3] = {
-
- MGN_default, // 00 --no-symbol--
- MGN_default, // ! 01 Police, Sheriff
- MGN_default, // " 02 reserved (was rain)
- MGN_aerial, // # 03 DIGI (white center)
- MGN_default, // $ 04 PHONE
- MGN_aerial, // % 05 DX CLUSTER
- MGN_aerial, // & 06 HF GATEway
- MGN_airport, // ' 07 Small AIRCRAFT
- MGN_aerial, // ( 08 Mobile Satellite Station
- MGN_default, // ) 09 Wheelchair (handicapped)
- MGN_default, // * 10 SnowMobile
- MGN_default, // + 11 Red Cross
- MGN_default, // , 12 Boy Scouts
- MGN_house, // - 13 House QTH (VHF)
- MGN_default, // . 14 X
- MGN_default, // / 15 Red Dot
- MGN_default, // 0 16 # circle (obsolete)
- MGN_default, // 1 17 TBD
- MGN_default, // 2 18 TBD
- MGN_default, // 3 19 TBD
- MGN_default, // 4 20 TBD
- MGN_default, // 5 21 TBD
- MGN_default, // 6 22 TBD
- MGN_default, // 7 23 TBD
- MGN_default, // 8 24 TBD
- MGN_default, // 9 25 TBD
- MGN_default, // : 26 FIRE
- MGN_camping, // ; 27 Campground (Portable ops)
- MGN_default, // < 28 Motorcycle
- MGN_default, // = 29 RAILROAD ENGINE
- MGN_default, // > 30 CAR
- MGN_default, // ? 31 SERVER for Files
- MGN_default, // @ 32 HC FUTURE predict (dot)
- MGN_first_aid, // A 33 Aid Station
- MGN_aerial, // B 34 BBS or PBBS
- MGN_boating, // C 35 Canoe
- MGN_default, // D 36
- MGN_default, // E 37 EYEBALL (Eye catcher!)
- MGN_default, // F 38 Farm Vehicle (tractor)
- MGN_default, // G 39 Grid Square (6 digit)
- MGN_hotel, // H 40 HOTEL (blue bed symbol)
- MGN_aerial, // I 41 TcpIp on air network stn
- MGN_default, // J 42
- MGN_default, // K 43 School
- MGN_default, // L 44 PC user
- MGN_default, // M 45 MacAPRS
- MGN_aerial, // N 46 NTS Station
- MGN_airport, // O 47 BALLOON
- MGN_default, // P 48 Police
- MGN_default, // Q 49 TBD
- MGN_RV_service, // R 50 REC. VEHICLE
- MGN_airport, // S 51 SHUTTLE
- MGN_default, // T 52 SSTV
- MGN_default, // U 53 BUS
- MGN_default, // V 54 ATV
- MGN_default, // W 55 National WX Service Site
- MGN_default, // X 56 HELO
- MGN_boating, // Y 57 YACHT (sail)
- MGN_default, // Z 58 WinAPRS
- MGN_default, // [ 59 Human/Person (HT)
- MGN_default, // \ 60 TRIANGLE(DF station)
- MGN_default, // ] 61 MAIL/PostOffice(was PBBS)
- MGN_airport, // ^ 62 LARGE AIRCRAFT
- MGN_default, // _ 63 WEATHER Station (blue)
- MGN_aerial, // ` 64 Dish Antenna
- MGN_default, // a 65 AMBULANCE
- MGN_default, // b 66 BIKE
- MGN_default, // c 67 Incident Command Post
- MGN_default, // d 68 Fire dept
- MGN_zoo, // e 69 HORSE (equestrian)
- MGN_default, // f 70 FIRE TRUCK
- MGN_airport, // g 71 Glider
- MGN_default, // h 72 HOSPITAL
- MGN_default, // i 73 IOTA (islands on the air)
- MGN_default, // j 74 JEEP
- MGN_default, // k 75 TRUCK
- MGN_default, // l 76 Laptop
- MGN_aerial, // m 77 Mic-E Repeater
- MGN_default, // n 78 Node (black bulls-eye)
- MGN_default, // o 79 EOC
- MGN_zoo, // p 80 ROVER (puppy, or dog)
- MGN_default, // q 81 GRID SQ shown above 128 m
- MGN_aerial, // r 82 Repeater
- MGN_default, // s 83 SHIP (pwr boat)
- MGN_default, // t 84 TRUCK STOP
- MGN_default, // u 85 TRUCK (18 wheeler)
- MGN_default, // v 86 VAN
- MGN_default, // w 87 WATER station
- MGN_aerial, // x 88 xAPRS (Unix)
- MGN_aerial, // y 89 YAGI @ QTH
- MGN_default, // z 90 TBD
- MGN_default, // { 91
- MGN_default, // | 92 TNC Stream Switch
- MGN_default, // } 93
- MGN_default }; // ~ 94 TNC Stream Switch
-
-
-static const char mgn_alternate_symtab[SYMTAB_SIZE][3] = {
-
- MGN_default, // 00 --no-symbol--
- MGN_default, // ! 01 EMERGENCY (!)
- MGN_default, // " 02 reserved
- MGN_aerial, // # 03 OVERLAY DIGI (green star)
- MGN_ATM, // $ 04 Bank or ATM (green box)
- MGN_default, // % 05 Power Plant with overlay
- MGN_aerial, // & 06 I=Igte IGate R=RX T=1hopTX 2=2hopTX
- MGN_default, // ' 07 Crash (& now Incident sites)
- MGN_default, // ( 08 CLOUDY (other clouds w ovrly)
- MGN_aerial, // ) 09 Firenet MEO, MODIS Earth Obs.
- MGN_default, // * 10 SNOW (& future ovrly codes)
- MGN_default, // + 11 Church
- MGN_default, // , 12 Girl Scouts
- MGN_house, // - 13 House (H=HF) (O = Op Present)
- MGN_default, // . 14 Ambiguous (Big Question mark)
- MGN_default, // / 15 Waypoint Destination
- MGN_default, // 0 16 CIRCLE (E/I/W=IRLP/Echolink/WIRES)
- MGN_default, // 1 17
- MGN_default, // 2 18
- MGN_default, // 3 19
- MGN_default, // 4 20
- MGN_default, // 5 21
- MGN_default, // 6 22
- MGN_default, // 7 23
- MGN_aerial, // 8 24 802.11 or other network node
- MGN_fuel, // 9 25 Gas Station (blue pump)
- MGN_default, // : 26 Hail (& future ovrly codes)
- MGN_park, // ; 27 Park/Picnic area
- MGN_default, // < 28 ADVISORY (one WX flag)
- MGN_default, // = 29 APRStt Touchtone (DTMF users)
- MGN_default, // > 30 OVERLAID CAR
- MGN_tourist_info, // ? 31 INFO Kiosk (Blue box with ?)
- MGN_default, // @ 32 HURRICANE/Trop-Storm
- MGN_box, // A 33 overlayBOX DTMF & RFID & XO
- MGN_default, // B 34 Blwng Snow (& future codes)
- MGN_boating, // C 35 Coast Guard
- MGN_default, // D 36 Drizzle (proposed APRStt)
- MGN_default, // E 37 Smoke (& other vis codes)
- MGN_default, // F 38 Freezng rain (&future codes)
- MGN_default, // G 39 Snow Shwr (& future ovrlys)
- MGN_default, // H 40 Haze (& Overlay Hazards)
- MGN_default, // I 41 Rain Shower
- MGN_default, // J 42 Lightning (& future ovrlys)
- MGN_default, // K 43 Kenwood HT (W)
- MGN_lighthouse, // L 44 Lighthouse
- MGN_default, // M 45 MARS (A=Army,N=Navy,F=AF)
- MGN_buoy, // N 46 Navigation Buoy
- MGN_airport, // O 47 Rocket
- MGN_default, // P 48 Parking
- MGN_default, // Q 49 QUAKE
- MGN_restaurant, // R 50 Restaurant
- MGN_aerial, // S 51 Satellite/Pacsat
- MGN_default, // T 52 Thunderstorm
- MGN_default, // U 53 SUNNY
- MGN_nav_aid, // V 54 VORTAC Nav Aid
- MGN_default, // W 55 # NWS site (NWS options)
- MGN_default, // X 56 Pharmacy Rx (Apothicary)
- MGN_aerial, // Y 57 Radios and devices
- MGN_default, // Z 58
- MGN_default, // [ 59 W.Cloud (& humans w Ovrly)
- MGN_default, // \ 60 New overlayable GPS symbol
- MGN_default, // ] 61
- MGN_airport, // ^ 62 # Aircraft (shows heading)
- MGN_default, // _ 63 # WX site (green digi)
- MGN_default, // ` 64 Rain (all types w ovrly)
- MGN_aerial, // a 65 ARRL, ARES, WinLINK
- MGN_default, // b 66 Blwng Dst/Snd (& others)
- MGN_default, // c 67 CD triangle RACES/SATERN/etc
- MGN_default, // d 68 DX spot by callsign
- MGN_default, // e 69 Sleet (& future ovrly codes)
- MGN_default, // f 70 Funnel Cloud
- MGN_default, // g 71 Gale Flags
- MGN_default, // h 72 Store. or HAMFST Hh=HAM store
- MGN_box, // i 73 BOX or points of Interest
- MGN_default, // j 74 WorkZone (Steam Shovel)
- MGN_default, // k 75 Special Vehicle SUV,ATV,4x4
- MGN_default, // l 76 Areas (box,circles,etc)
- MGN_default, // m 77 Value Sign (3 digit display)
- MGN_default, // n 78 OVERLAY TRIANGLE
- MGN_default, // o 79 small circle
- MGN_default, // p 80 Prtly Cldy (& future ovrlys)
- MGN_default, // q 81
- MGN_default, // r 82 Restrooms
- MGN_default, // s 83 OVERLAY SHIP/boat (top view)
- MGN_default, // t 84 Tornado
- MGN_default, // u 85 OVERLAID TRUCK
- MGN_default, // v 86 OVERLAID Van
- MGN_default, // w 87 Flooding
- MGN_wreck, // x 88 Wreck or Obstruction ->X<-
- MGN_default, // y 89 Skywarn
- MGN_default, // z 90 OVERLAID Shelter
- MGN_default, // { 91 Fog (& future ovrly codes)
- MGN_default, // | 92 TNC Stream Switch
- MGN_default, // } 93
- MGN_default }; // ~ 94 TNC Stream Switch
-
diff --git a/mheard.h b/mheard.h
deleted file mode 100644
index f8466ba..0000000
--- a/mheard.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-/* mheard.h */
-
-#include "decode_aprs.h" // for decode_aprs_t
-
-
-void mheard_init (int debug);
-
-void mheard_save_rf (int chan, decode_aprs_t *A, packet_t pp, alevel_t alevel, retry_t retries);
-
-void mheard_save_is (char *ptext);
-
-int mheard_count (int max_hops, int time_limit);
-
-int mheard_was_recently_nearby (char *role, char *callsign, int time_limit, int max_hops, double dlat, double dlon, double km);
-
-void mheard_set_msp (char *callsign, int num);
-
-int mheard_get_msp (char *callsign);
\ No newline at end of file
diff --git a/morse.h b/morse.h
deleted file mode 100644
index e34dd7b..0000000
--- a/morse.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* morse.h */
-
-int morse_init (struct audio_s *audio_config_p, int amp) ;
-
-int morse_send (int chan, char *str, int wpm, int txdelay, int txtail);
-
-#define MORSE_DEFAULT_WPM 10
-
diff --git a/multi_modem.h b/multi_modem.h
deleted file mode 100644
index de3061e..0000000
--- a/multi_modem.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* multi_modem.h */
-
-#ifndef MULTI_MODEM_H
-#define MULTI_MODEM 1
-
-/* Needed for typedef retry_t. */
-#include "hdlc_rec2.h"
-
-/* Needed for struct audio_s */
-#include "audio.h"
-
-
-void multi_modem_init (struct audio_s *pmodem);
-
-void multi_modem_process_sample (int c, int audio_sample);
-
-int multi_modem_get_dc_average (int chan);
-
-// Deprecated. Replace with ...packet
-void multi_modem_process_rec_frame (int chan, int subchan, int slice, unsigned char *fbuf, int flen, alevel_t alevel, retry_t retries, int is_fx25);
-
-void multi_modem_process_rec_packet (int chan, int subchan, int slice, packet_t pp, alevel_t alevel, retry_t retries, int is_fx25);
-
-#endif
diff --git a/pfilter.h b/pfilter.h
deleted file mode 100644
index d54e056..0000000
--- a/pfilter.h
+++ /dev/null
@@ -1,13 +0,0 @@
-
-/* pfilter.h */
-
-
-#include "igate.h" // for igate_config_s
-
-
-
-void pfilter_init (struct igate_config_s *p_igate_config, int debug_level);
-
-int pfilter (int from_chan, int to_chan, char *filter, packet_t pp, int is_aprs);
-
-int is_telem_metadata (char *infop);
\ No newline at end of file
diff --git a/ptt.h b/ptt.h
deleted file mode 100644
index 6e75253..0000000
--- a/ptt.h
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-#ifndef PTT_H
-#define PTT_H 1
-
-
-#include "audio.h" /* for struct audio_s and definitions for octype values */
-
-
-void ptt_set_debug(int debug);
-
-void ptt_init (struct audio_s *p_modem);
-
-void ptt_set (int octype, int chan, int ptt);
-
-void ptt_term (void);
-
-int get_input (int it, int chan);
-
-#endif
-
-
-/* end ptt.h */
-
-
-
diff --git a/recv.h b/recv.h
deleted file mode 100644
index 3201991..0000000
--- a/recv.h
+++ /dev/null
@@ -1,6 +0,0 @@
-
-/* recv.h */
-
-void recv_init (struct audio_s *pa);
-
-void recv_process (void);
\ No newline at end of file
diff --git a/redecode.h b/redecode.h
deleted file mode 100644
index ffd9a95..0000000
--- a/redecode.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-#ifndef REDECODE_H
-#define REDECODE_H 1
-
-#include "rrbb.h"
-
-
-extern void redecode_init (struct audio_s *p_audio_config);
-
-
-#endif
-
-/* end redecode.h */
-
diff --git a/release/moc_predefs-DESKTOP-MHE5LO8.h b/release/moc_predefs.h
similarity index 95%
rename from release/moc_predefs-DESKTOP-MHE5LO8.h
rename to release/moc_predefs.h
index 4c9c0c7..54e9037 100644
--- a/release/moc_predefs-DESKTOP-MHE5LO8.h
+++ b/release/moc_predefs.h
@@ -1,11 +1,11 @@
-#define _MSC_EXTENSIONS
-#define _INTEGRAL_MAX_BITS 64
-#define _MSC_VER 1916
-#define _MSC_FULL_VER 191627043
-#define _MSC_BUILD 0
-#define _WIN32
-#define _M_IX86 600
-#define _M_IX86_FP 2
-#define _CPPRTTI
-#define _MT
-#define _DLL
+#define _MSC_EXTENSIONS
+#define _INTEGRAL_MAX_BITS 64
+#define _MSC_VER 1916
+#define _MSC_FULL_VER 191627043
+#define _MSC_BUILD 0
+#define _WIN32
+#define _M_IX86 600
+#define _M_IX86_FP 2
+#define _CPPRTTI
+#define _MT
+#define _DLL
diff --git a/rpack.h b/rpack.h
deleted file mode 100644
index d972a54..0000000
--- a/rpack.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/*------------------------------------------------------------------
- *
- * File: rpack.h
- *
- * Purpose: Definition of Garmin Rino message format.
- *
- * References: http://www.radio-active.net.au/web3/APRS/Resources/RINO
- *
- * http://www.radio-active.net.au/web3/APRS/Resources/RINO/OnAir
- *
- *---------------------------------------------------------------*/
-
-
-#ifndef RPACK_H
-#define RPACK_H 1
-
-
-#define RPACK_FRAME_LEN 168
-
-
-#ifdef RPACK_C /* Expose private details */
-
-
-
-// Transmission order is LSB first.
-
-struct __attribute__((__packed__)) rpack_s {
-
- int lat; // Latitude.
- // Signed integer. Scaled by 2**30/90.
-
- int lon; // Longitude. Same encoding.
-
- char unknown1; // Unproven theory: altitude.
- char unknown2;
-
- unsigned name0:6; // 10 character name.
- unsigned name1:6; // Bit packing is implementation dependent.
- unsigned name2:6; // Should rewrite to be more portable.
- unsigned name3:6;
- unsigned name4:6;
- unsigned name5:6;
- unsigned name6:6;
- unsigned name7:6;
- unsigned name8:6;
- unsigned name9:6;
-
- unsigned symbol:5;
-
- unsigned unknown3:7;
-
-
-// unsigned crc:16; // Safe bet this is CRC for error checking.
-
- unsigned char crc1;
- unsigned char crc2;
-
- char dummy[3]; // Total size should be 24 bytes if no gaps.
-
-};
-
-#else /* Show only public interface. */
-
-
-struct rpack_s {
- char stuff[24];
-};
-
-
-#endif
-
-
-
-void rpack_set_bit (struct rpack_s *rp, int position, int value);
-
-int rpack_is_valid (struct rpack_s *rp);
-
-int rpack_get_bit (struct rpack_s *rp, int position);
-
-double rpack_get_lat (struct rpack_s *rp);
-
-double rpack_get_lon (struct rpack_s *rp);
-
-int rpack_get_symbol (struct rpack_s *rp);
-
-void rpack_get_name (struct rpack_s *rp, char *str);
-
-
-
-#endif
-
-/* end rpack.h */
-
diff --git a/rrbb.h b/rrbb.h
deleted file mode 100644
index 4b28372..0000000
--- a/rrbb.h
+++ /dev/null
@@ -1,92 +0,0 @@
-
-#ifndef RRBB_H
-
-#define RRBB_H
-
-
-#define FASTER13 1 // Don't pack 8 samples per byte.
-
-
-//typedef short slice_t;
-
-
-/*
- * Maximum size (in bytes) of an AX.25 frame including the 2 octet FCS.
- */
-
-#define MAX_FRAME_LEN ((AX25_MAX_PACKET_LEN) + 2)
-
-/*
- * Maximum number of bits in AX.25 frame excluding the flags.
- * Adequate for extreme case of bit stuffing after every 5 bits
- * which could never happen.
- */
-
-#define MAX_NUM_BITS (MAX_FRAME_LEN * 8 * 6 / 5)
-
-typedef struct rrbb_s {
- int magic1;
- struct rrbb_s* nextp; /* Next pointer to maintain a queue. */
-
- int chan; /* Radio channel from which it was received. */
- int subchan; /* Which modem when more than one per channel. */
- int slice; /* Which slicer. */
-
- alevel_t alevel; /* Received audio level at time of frame capture. */
- unsigned int len; /* Current number of samples in array. */
-
- int is_scrambled; /* Is data scrambled G3RUH / K9NG style? */
- int descram_state; /* Descrambler state before first data bit of frame. */
- int prev_descram; /* Previous descrambled bit. */
-
- unsigned char fdata[MAX_NUM_BITS];
-
- int magic2;
-} *rrbb_t;
-
-
-
-rrbb_t rrbb_new (int chan, int subchan, int slice, int is_scrambled, int descram_state, int prev_descram);
-
-void rrbb_clear (rrbb_t b, int is_scrambled, int descram_state, int prev_descram);
-
-
-static inline /*__attribute__((always_inline))*/ void rrbb_append_bit (rrbb_t b, const unsigned char val)
-{
- if (b->len >= MAX_NUM_BITS) {
- return; /* Silently discard if full. */
- }
- b->fdata[b->len] = val;
- b->len++;
-}
-
-static inline /*__attribute__((always_inline))*/ unsigned char rrbb_get_bit (const rrbb_t b, const int ind)
-{
- return (b->fdata[ind]);
-}
-
-
-void rrbb_chop8 (rrbb_t b);
-
-int rrbb_get_len (rrbb_t b);
-
-//void rrbb_flip_bit (rrbb_t b, unsigned int ind);
-
-void rrbb_delete (rrbb_t b);
-
-void rrbb_set_nextp (rrbb_t b, rrbb_t np);
-rrbb_t rrbb_get_nextp (rrbb_t b);
-
-int rrbb_get_chan (rrbb_t b);
-int rrbb_get_subchan (rrbb_t b);
-int rrbb_get_slice (rrbb_t b);
-
-void rrbb_set_audio_level (rrbb_t b, alevel_t alevel);
-alevel_t rrbb_get_audio_level (rrbb_t b);
-
-int rrbb_get_is_scrambled (rrbb_t b);
-int rrbb_get_descram_state (rrbb_t b);
-int rrbb_get_prev_descram (rrbb_t b);
-
-
-#endif
diff --git a/serial_port.h b/serial_port.h
deleted file mode 100644
index 8a65a0b..0000000
--- a/serial_port.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* serial_port.h */
-
-
-#ifndef SERIAL_PORT_H
-#define SERIAL_PORT_H 1
-
-
-#if __WIN32__
-
-#include
-
-typedef HANDLE MYFDTYPE;
-#define MYFDERROR INVALID_HANDLE_VALUE
-
-#else
-
-typedef int MYFDTYPE;
-#define MYFDERROR (-1)
-
-#endif
-
-
-extern MYFDTYPE serial_port_open (char *devicename, int baud);
-
-extern int serial_port_write (MYFDTYPE fd, char *str, int len);
-
-extern int serial_port_get1 (MYFDTYPE fd);
-
-extern void serial_port_close (MYFDTYPE fd);
-
-
-#endif
\ No newline at end of file
diff --git a/server.h b/server.h
deleted file mode 100644
index 4cc2ea0..0000000
--- a/server.h
+++ /dev/null
@@ -1,32 +0,0 @@
-
-/*
- * Name: server.h
- */
-
-
-#include "ax25_pad.h" /* for packet_t */
-
-#include "config.h"
-
-
-void server_set_debug (int n);
-
-void server_init (struct audio_s *audio_config_p, struct misc_config_s *misc_config);
-
-void server_send_rec_packet (int chan, packet_t pp, unsigned char *fbuf, int flen);
-
-void server_send_monitored (int chan, packet_t pp, int own_xmit);
-
-int server_callsign_registered_by_client (char *callsign);
-
-
-void server_link_established (int chan, int client, char *remote_call, char *own_call, int incoming);
-
-void server_link_terminated (int chan, int client, char *remote_call, char *own_call, int timeout);
-
-void server_rec_conn_data (int chan, int client, char *remote_call, char *own_call, int pid, char *data_ptr, int data_len);
-
-void server_outstanding_frames_reply (int chan, int client, char *own_call, char *remote_call, int count);
-
-
-/* end server.h */
diff --git a/sm_main.c b/sm_main.c
index 57bf549..d2c6cfd 100644
--- a/sm_main.c
+++ b/sm_main.c
@@ -27,7 +27,6 @@ void make_core_BPF(UCHAR snd_ch, short freq, short width);
void make_core_TXBPF(UCHAR snd_ch, float freq, float width);
void make_core_INTR(UCHAR snd_ch);
void make_core_LPF(UCHAR snd_ch, short width);
-void wf_pointer(int snd_ch);
void dw9600ProcessSample(int snd_ch, short Sample);
void init_RUH48(int snd_ch);
void init_RUH96(int snd_ch);
@@ -65,11 +64,8 @@ int TXPort = 8884;
BOOL Firstwaterfall = 1;
BOOL Secondwaterfall = 1;
-
int multiCore = FALSE;
-
-
BOOL MinOnStart = 0;
//RS TReedSolomon;
// Form1 TForm1;
@@ -728,7 +724,7 @@ void init_speed(int snd_ch)
form1.show_freq_a;
form1.show_freq_b;
*/
- wf_pointer(snd_ch);
+ NeedWaterfallHeaders = TRUE;
CheckPSKWindows();
}
@@ -863,6 +859,8 @@ void runModemthread(void * param)
// I think this processes a buffer of samples
+int Toggle = 0;
+
void BufferFull(short * Samples, int nSamples) // These are Stereo Samples
{
word i, i1, j;
@@ -1064,6 +1062,8 @@ void BufferFull(short * Samples, int nSamples) // These are Stereo Samples
// Collect samples for both channels if needed
+ Toggle++;
+
Needed = FFTSize - fftCount;
if (Needed <= rx_bufsize)
@@ -1076,7 +1076,8 @@ void BufferFull(short * Samples, int nSamples) // These are Stereo Samples
data1 += 2;
}
- doWaterfall(FirstWaterfallChan);
+ if ((Toggle & 1) || (UsingBothChannels == 0))
+ doWaterfall(FirstWaterfallChan);
if (data2)
{
@@ -1085,9 +1086,13 @@ void BufferFull(short * Samples, int nSamples) // These are Stereo Samples
*ptr2++ = *data2;
data2 += 2;
}
- doWaterfall(1);
+ if (((Toggle & 1) == 0))
+ doWaterfall(1);
}
+ if (Firstwaterfall || Secondwaterfall)
+ displayWaterfall();
+
remainingSamples = rx_bufsize - Needed;
fftCount = 0;
diff --git a/symbols.h b/symbols.h
deleted file mode 100644
index 5ed91ad..0000000
--- a/symbols.h
+++ /dev/null
@@ -1,19 +0,0 @@
-
-/* symbols.h */
-
-void symbols_init (void);
-
-void symbols_list (void);
-
-void symbols_from_dest_or_src (char dti, char *src, char *dest, char *symtab, char *symbol);
-
-int symbols_into_dest (char symtab, char symbol, char *dest);
-
-void symbols_get_description (char symtab, char symbol, char *description, size_t desc_size);
-
-int symbols_code_from_description (char overlay, char *description, char *symtab, char *symbol);
-
-void symbols_to_tones (char symtab, char symbol, char *tones, size_t tonessize);
-
-
-/* end symbols.h */
diff --git a/telemetry.h b/telemetry.h
deleted file mode 100644
index 4ef9b62..0000000
--- a/telemetry.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-/* telemetry.h */
-
-void telemetry_data_original (char *station, char *info, int quiet, char *output, size_t outputsize, char *comment, size_t commentsize);
-
-void telemetry_data_base91 (char *station, char *cdata, char *output, size_t outputsize);
-
-void telemetry_name_message (char *station, char *msg);
-
-void telemetry_unit_label_message (char *station, char *msg);
-
-void telemetry_coefficents_message (char *station, char *msg, int quiet);
-
-void telemetry_bit_sense_message (char *station, char *msg, int quiet);
diff --git a/tq.h b/tq.h
deleted file mode 100644
index 37599d5..0000000
--- a/tq.h
+++ /dev/null
@@ -1,41 +0,0 @@
-
-/*------------------------------------------------------------------
- *
- * Module: tq.h
- *
- * Purpose: Transmit queue - hold packets for transmission until the channel is clear.
- *
- *---------------------------------------------------------------*/
-
-#ifndef TQ_H
-#define TQ_H 1
-
-#include "ax25_pad.h"
-#include "audio.h"
-
-#define TQ_NUM_PRIO 2 /* Number of priorities. */
-
-#define TQ_PRIO_0_HI 0
-#define TQ_PRIO_1_LO 1
-
-
-
-void tq_init (struct audio_s *audio_config_p);
-
-void tq_append (int chan, int prio, packet_t pp);
-
-void lm_data_request (int chan, int prio, packet_t pp);
-
-void lm_seize_request (int chan);
-
-void tq_wait_while_empty (int chan);
-
-packet_t tq_remove (int chan, int prio);
-
-packet_t tq_peek (int chan, int prio);
-
-int tq_count (int chan, int prio, char *source, char *dest, int bytes);
-
-#endif
-
-/* end tq.h */
diff --git a/tt_text.h b/tt_text.h
deleted file mode 100644
index 7cab3b8..0000000
--- a/tt_text.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-/* tt_text.h */
-
-
-/* Encode normal human readable to DTMF representation. */
-
-int tt_text_to_multipress (const char *text, int quiet, char *buttons);
-
-int tt_text_to_two_key (const char *text, int quiet, char *buttons);
-
-int tt_text_to_call10 (const char *text, int quiet, char *buttons);
-
-int tt_text_to_mhead (const char *text, int quiet, char *buttons, size_t buttonsiz);
-
-int tt_text_to_satsq (const char *text, int quiet, char *buttons, size_t buttonsiz);
-
-int tt_text_to_ascii2d (const char *text, int quiet, char *buttons);
-
-
-/* Decode DTMF to normal human readable form. */
-
-int tt_multipress_to_text (const char *buttons, int quiet, char *text);
-
-int tt_two_key_to_text (const char *buttons, int quiet, char *text);
-
-int tt_call10_to_text (const char *buttons, int quiet, char *text);
-
-int tt_call5_suffix_to_text (const char *buttons, int quiet, char *text);
-
-int tt_mhead_to_text (const char *buttons, int quiet, char *text, size_t textsiz);
-
-int tt_satsq_to_text (const char *buttons, int quiet, char *text);
-
-int tt_ascii2d_to_text (const char *buttons, int quiet, char *text);
-
-
-
-/* end tt_text.h */
\ No newline at end of file
diff --git a/tt_user.h b/tt_user.h
deleted file mode 100644
index 4ff2ec8..0000000
--- a/tt_user.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-/* tt_user.h */
-
-
-#include "audio.h"
-
-void tt_user_init (struct audio_s *p_audio_config, struct tt_config_s *p);
-
-int tt_user_heard (char *callsign, int ssid, char overlay, char symbol, char *loc_text, double latitude,
- double longitude, int ambiguity, char *freq, char *ctcss, char *comment, char mic_e, char *dao);
-
-int tt_3char_suffix_search (char *suffix, char *callsign);
-
-void tt_user_background (void);
-void tt_user_dump (void);
\ No newline at end of file
diff --git a/tune.h b/tune.h
deleted file mode 100644
index 8d1c8b6..0000000
--- a/tune.h
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/version.h b/version.h
deleted file mode 100644
index a09490c..0000000
--- a/version.h
+++ /dev/null
@@ -1,21 +0,0 @@
-
-/* Dire Wolf version 1.6 */
-
-// Put in destination field to identify the equipment used.
-
-#define APP_TOCALL "APDW" // Assigned by WB4APR in tocalls.txt
-
-// This now comes from compile command line options.
-
-//#define MAJOR_VERSION 1
-//#define MINOR_VERSION 6
-//#define EXTRA_VERSION "Beta Test"
-
-
-// For user-defined data format.
-// APRS protocol spec Chapter 18 and http://www.aprs.org/aprs11/expfmts.txt
-
-#define USER_DEF_USER_ID 'D' // user id D for direwolf
-
-#define USER_DEF_TYPE_AIS 'A' // data type A for AIS NMEA sentence
-#define USER_DEF_TYPE_EAS 'E' // data type E for EAS broadcasts
diff --git a/waypoint.h b/waypoint.h
deleted file mode 100644
index 3ba6f1c..0000000
--- a/waypoint.h
+++ /dev/null
@@ -1,24 +0,0 @@
-
-/*
- * Name: waypoint.h
- */
-
-
-#include "ax25_pad.h" /* for packet_t */
-
-#include "config.h" /* for struct misc_config_s */
-
-
-void waypoint_init (struct misc_config_s *misc_config);
-
-void waypoint_set_debug (int n);
-
-void waypoint_send_sentence (char *wname_in, double dlat, double dlong, char symtab, char symbol,
- float alt, float course, float speed, char *comment_in);
-
-void waypoint_send_ais (char *sentence);
-
-void waypoint_term ();
-
-
-/* end waypoint.h */
diff --git a/xid.h b/xid.h
deleted file mode 100644
index a221b73..0000000
--- a/xid.h
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-/* xid.h */
-
-
-#include "ax25_pad.h" // for enum ax25_modulo_e
-
-
-struct xid_param_s {
-
- int full_duplex;
-
- // Order is important because negotiation keeps the lower value of
- // REJ (srej_none), SREJ (default without negotiation), Multi-SREJ (if both agree).
-
- enum srej_e { srej_none=0, srej_single=1, srej_multi=2, srej_not_specified=3 } srej;
-
- enum ax25_modulo_e modulo;
-
- int i_field_length_rx; /* In bytes. XID has it in bits. */
-
- int window_size_rx;
-
- int ack_timer; /* "T1" in mSec. */
-
- int retries; /* "N1" */
-};
-
-
-int xid_parse (unsigned char *info, int info_len, struct xid_param_s *result, char *desc, int desc_size);
-
-int xid_encode (struct xid_param_s *param, unsigned char *info, cmdres_t cr);
\ No newline at end of file
diff --git a/xmit.h b/xmit.h
deleted file mode 100644
index 248037d..0000000
--- a/xmit.h
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-#ifndef XMIT_H
-#define XMIT_H 1
-
-#include "audio.h" /* for struct audio_s */
-
-
-extern void xmit_init (struct audio_s *p_modem, int debug_xmit_packet);
-
-extern void xmit_set_txdelay (int channel, int value);
-
-extern void xmit_set_persist (int channel, int value);
-
-extern void xmit_set_slottime (int channel, int value);
-
-extern void xmit_set_txtail (int channel, int value);
-
-extern void xmit_set_fulldup (int channel, int value);
-
-
-extern int xmit_speak_it (char *script, int c, char *msg);
-
-#endif
-
-/* end xmit.h */
-