This commit is contained in:
John Wiseman 2023-05-25 14:21:20 +01:00
parent da0d431a34
commit bc3a33aabf
61 changed files with 72717 additions and 72491 deletions

File diff suppressed because it is too large Load diff

4136
ARDOPC.c

File diff suppressed because it is too large Load diff

1540
ARDOPC.h

File diff suppressed because it is too large Load diff

View file

@ -1,367 +1,367 @@
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
#endif
#include "ARDOPC.h"
VOID SortSignals2(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin);
int LastBusyOn;
int LastBusyOff;
BOOL blnLastBusy = FALSE;
float dblAvgStoNSlowNarrow;
float dblAvgStoNFastNarrow;
float dblAvgStoNSlowWide;
float dblAvgStoNFastWide;
int intLastStart = 0;
int intLastStop = 0;
int intBusyOnCnt = 0; // used to filter Busy ON detections
int intBusyOffCnt = 0; // used to filter Busy OFF detections
int dttLastBusyTrip = 0;
int dttPriorLastBusyTrip = 0;
int dttLastBusyClear = 0;
int dttLastTrip;
extern float dblAvgPk2BaselineRatio, dblAvgBaselineSlow, dblAvgBaselineFast;
int intHoldMs = 5000;
VOID ClearBusy()
{
dttLastBusyTrip = Now;
dttPriorLastBusyTrip = dttLastBusyTrip;
dttLastBusyClear = dttLastBusyTrip + 610; // This insures test in ARDOPprotocol ~ line 887 will work
dttLastTrip = dttLastBusyTrip -intHoldMs; // This clears the busy detect immediatly (required for scanning when re enabled by Listen=True
blnLastBusy = False;
intBusyOnCnt = 0;
intBusyOffCnt = 0;
intLastStart = 0;
intLastStop = 0; // This will force the busy detector to ignore old averages and initialze the rolling average filters
}
/*
// Function to implement a busy detector based on 1024 point FFT
BOOL BusyDetect2(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
{
// each bin is about 12000/1024 or 11.72 Hz
// this only called while searching for leader ...once leader detected, no longer called.
// First sort signals and look at highes signals:baseline ratio..
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
float dblFastAlpha = 0.4f;
float dblSlowAlpha = 0.2f;
float dblAvgStoNNarrow, dblAvgStoNWide;
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
int blnBusy = FALSE;
float dblAvgStoNSlowNarrow = 0;
float dblAvgStoNFastNarrow = 0;
float dblAvgStoNSlowWide = 0;
float dblAvgStoNFastWide = 0;
// First narrow band (~94Hz)
SortSignals(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
if (intLastStart == intStart && intLastStop == intStop)
{
dblAvgStoNSlowNarrow = (1 - dblSlowAlpha) * dblAvgStoNSlowNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
dblAvgStoNFastNarrow = (1 - dblFastAlpha) * dblAvgStoNFastNarrow + dblFastAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
}
else
{
dblAvgStoNSlowNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
dblAvgStoNFastNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
intLastStart = intStart;
intLastStop = intStop;
}
dblAvgStoNNarrow = max(dblAvgStoNSlowNarrow, dblAvgStoNFastNarrow); // computes fast attack, slow release
// Wide band (66% ofr current bandwidth)
SortSignals(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
if (intLastStart == intStart && intLastStop == intStop)
{
dblAvgStoNSlowWide = (1 - dblSlowAlpha) * dblAvgStoNSlowWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
dblAvgStoNFastWide = (1 - dblFastAlpha) * dblAvgStoNFastWide + dblFastAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
}
else
{
dblAvgStoNSlowWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
dblAvgStoNFastWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
intLastStart = intStart;
intLastStop = intStop;
}
dblAvgStoNNarrow = max(dblAvgStoNSlowNarrow, dblAvgStoNFastNarrow); // computes fast attack, slow release
dblAvgStoNWide = max(dblAvgStoNSlowWide, dblAvgStoNFastWide); // computes fast attack, slow release
// Preliminary calibration...future a function of bandwidth and BusyDet.
switch (ARQBandwidth)
{
case B200MAX:
case B200FORCED:
if (dblAvgStoNNarrow > 1.5 * BusyDet|| dblAvgStoNWide > 2.5 * BusyDet)
blnBusy = True;
break;
case B500MAX:
case B500FORCED:
if (dblAvgStoNNarrow > 1.5 * BusyDet || dblAvgStoNWide > 2.5 * BusyDet)
blnBusy = True;
break;
case B1000MAX:
case B1000FORCED:
if (dblAvgStoNNarrow > 1.4 * BusyDet || dblAvgStoNWide > 2 * BusyDet)
blnBusy = True;
break;
case B2000MAX:
case B2000FORCED:
if (dblAvgStoNNarrow > 1.4 * BusyDet || dblAvgStoNWide > 2 * BusyDet)
blnBusy = True;
}
if (blnBusy) // This used to skip over one call busy nuisance trips. Busy must be present at least 2 consecutive times to be reported
{
intBusyOnCnt += 1;
intBusyOffCnt = 0;
if (intBusyOnCnt > 1)
blnBusy = True;
else if (!blnBusy)
{
intBusyOffCnt += 1;
intBusyOnCnt = 0;
if (intBusyOffCnt > 3)
blnBusy = False;
}
}
if (blnLastBusy == False && blnBusy)
{
int x = round(dblAvgStoNNarrow); // odd, but PI doesnt print floats properly
int y = round(dblAvgStoNWide);
blnLastBusy = True;
LastBusyOn = Now;
#ifdef __ARM_ARCH
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY ON StoN Narrow = %d StoN Wide %d", x, y);
#else
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY ON StoN Narrow = %f StoN Wide %f", dblAvgStoNNarrow, dblAvgStoNWide);
#endif
}
else if (blnLastBusy == True && !blnBusy)
{
int x = round(dblAvgStoNNarrow); // odd, but PI doesnt print floats properly
int y = round(dblAvgStoNWide);
blnLastBusy = False;
LastBusyOff = Now;
#ifdef __ARM_ARCH
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY OFF StoN Narrow = %d StoN Wide %d", x, y);
#else
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY OFF StoN Narrow = %f StoN Wide %f", dblAvgStoNNarrow, dblAvgStoNWide);
#endif
}
return blnLastBusy;
}
*/
BOOL BusyDetect3(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
{
// each bin is about 12000/1024 or 11.72 Hz
// this only called while searching for leader ...once leader detected, no longer called.
// First sort signals and look at highes signals:baseline ratio..
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
float dblSlowAlpha = 0.2f;
float dblAvgStoNNarrow = 0, dblAvgStoNWide = 0;
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
int blnBusy = FALSE;
int BusyDet4th = BusyDet * BusyDet * BusyDet * BusyDet;
// First sort signals and look at highest signals:baseline ratio..
// First narrow band (~94Hz)
SortSignals2(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
if (intLastStart == intStart && intLastStop == intStop)
dblAvgStoNNarrow = (1 - dblSlowAlpha) * dblAvgStoNNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
else
{
// This initializes the Narrow average after a bandwidth change
dblAvgStoNNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
intLastStart = intStart;
intLastStop = intStop;
}
// Wide band (66% of current bandwidth)
SortSignals2(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
if (intLastStart == intStart && intLastStop == intStop)
dblAvgStoNWide = (1 - dblSlowAlpha) * dblAvgStoNWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
else
{
// This initializes the Wide average after a bandwidth change
dblAvgStoNWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
intLastStart = intStart;
intLastStop = intStop;
}
// Preliminary calibration...future a function of bandwidth and BusyDet.
switch (ARQBandwidth)
{
case XB200:
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th)) || (dblAvgStoNWide > (5 + 0.02 * BusyDet4th));
break;
case XB500:
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th) )|| (dblAvgStoNWide > (5 + 0.02 * BusyDet4th));
break;
case XB2500:
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th)) || (dblAvgStoNWide > (5 + 0.016 * BusyDet4th));
}
if (BusyDet == 0)
blnBusy = FALSE; // 0 Disables check ?? Is this the best place to do this?
// WriteDebugLog(LOGDEBUG, "Busy %d Wide %f Narrow %f", blnBusy, dblAvgStoNWide, dblAvgStoNNarrow);
if (blnBusy)
{
// This requires multiple adjacent busy conditions to skip over one nuisance Busy trips.
// Busy must be present at least 3 consecutive times ( ~250 ms) to be reported
intBusyOnCnt += 1;
intBusyOffCnt = 0;
if (intBusyOnCnt > 3)
dttLastTrip = Now;
}
else
{
intBusyOffCnt += 1;
intBusyOnCnt = 0;
}
if (blnLastBusy == False && intBusyOnCnt >= 3)
{
dttPriorLastBusyTrip = dttLastBusyTrip; // save old dttLastBusyTrip for use in BUSYBLOCKING function
dttLastBusyTrip = Now;
blnLastBusy = True;
}
else
{
if (blnLastBusy && (Now - dttLastTrip) > intHoldMs && intBusyOffCnt >= 3)
{
dttLastBusyClear = Now;
blnLastBusy = False;
}
}
return blnLastBusy;
}
VOID SortSignals(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin)
{
// puts the top intNumber of bins between intStartBin and intStopBin into dblAVGSignalPerBin, the rest into dblAvgBaselinePerBin
// for decent accuracy intNumBins should be < 75% of intStopBin-intStartBin)
float dblAVGSignal[200] = {0};//intNumBins
float dblAVGBaseline[200] = {0};//intStopBin - intStartBin - intNumBins
float dblSigSum = 0;
float dblTotalSum = 0;
int intSigPtr = 0;
int intBasePtr = 0;
int i, j, k;
for (i = 0; i < intNumBins; i++)
{
for (j = intStartBin; j <= intStopBin; j++)
{
if (i == 0)
{
dblTotalSum += dblMag[j];
if (dblMag[j] > dblAVGSignal[i])
dblAVGSignal[i] = dblMag[j];
}
else
{
if (dblMag[j] > dblAVGSignal[i] && dblMag[j] < dblAVGSignal[i - 1])
dblAVGSignal[i] = dblMag[j];
}
}
}
for(k = 0; k < intNumBins; k++)
{
dblSigSum += dblAVGSignal[k];
}
*dblAVGSignalPerBin = dblSigSum / intNumBins;
*dblAVGBaselinePerBin = (dblTotalSum - dblSigSum) / (intStopBin - intStartBin - intNumBins + 1);
}
BOOL compare(const void *p1, const void *p2)
{
float x = *(const float *)p1;
float y = *(const float *)p2;
if (x < y)
return -1; // Return -1 if you want ascending, 1 if you want descending order.
else if (x > y)
return 1; // Return 1 if you want ascending, -1 if you want descending order.
return 0;
}
VOID SortSignals2(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin)
{
// puts the top intNumber of bins between intStartBin and intStopBin into dblAVGSignalPerBin, the rest into dblAvgBaselinePerBin
// for decent accuracy intNumBins should be < 75% of intStopBin-intStartBin)
// This version uses a native sort function which is much faster and reduces CPU loading significantly on wide bandwidths.
float dblSort[202];
float dblSum1 = 0, dblSum2 = 0;
int numtoSort = (intStopBin - intStartBin) + 1, i;
memcpy(dblSort, &dblMag[intStartBin], numtoSort * sizeof(float));
qsort((void *)dblSort, numtoSort, sizeof(float), compare);
for (i = numtoSort -1; i >= 0; i--)
{
if (i >= (numtoSort - intNumBins))
dblSum1 += dblSort[i];
else
dblSum2 += dblSort[i];
}
*dblAVGSignalPerBin = dblSum1 / intNumBins;
*dblAVGBaselinePerBin = dblSum2 / (intStopBin - intStartBin - intNumBins - 1);
}
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
#endif
#include "ARDOPC.h"
VOID SortSignals2(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin);
int LastBusyOn;
int LastBusyOff;
BOOL blnLastBusy = FALSE;
float dblAvgStoNSlowNarrow;
float dblAvgStoNFastNarrow;
float dblAvgStoNSlowWide;
float dblAvgStoNFastWide;
int intLastStart = 0;
int intLastStop = 0;
int intBusyOnCnt = 0; // used to filter Busy ON detections
int intBusyOffCnt = 0; // used to filter Busy OFF detections
int dttLastBusyTrip = 0;
int dttPriorLastBusyTrip = 0;
int dttLastBusyClear = 0;
int dttLastTrip;
extern float dblAvgPk2BaselineRatio, dblAvgBaselineSlow, dblAvgBaselineFast;
int intHoldMs = 5000;
VOID ClearBusy()
{
dttLastBusyTrip = Now;
dttPriorLastBusyTrip = dttLastBusyTrip;
dttLastBusyClear = dttLastBusyTrip + 610; // This insures test in ARDOPprotocol ~ line 887 will work
dttLastTrip = dttLastBusyTrip -intHoldMs; // This clears the busy detect immediatly (required for scanning when re enabled by Listen=True
blnLastBusy = False;
intBusyOnCnt = 0;
intBusyOffCnt = 0;
intLastStart = 0;
intLastStop = 0; // This will force the busy detector to ignore old averages and initialze the rolling average filters
}
/*
// Function to implement a busy detector based on 1024 point FFT
BOOL BusyDetect2(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
{
// each bin is about 12000/1024 or 11.72 Hz
// this only called while searching for leader ...once leader detected, no longer called.
// First sort signals and look at highes signals:baseline ratio..
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
float dblFastAlpha = 0.4f;
float dblSlowAlpha = 0.2f;
float dblAvgStoNNarrow, dblAvgStoNWide;
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
int blnBusy = FALSE;
float dblAvgStoNSlowNarrow = 0;
float dblAvgStoNFastNarrow = 0;
float dblAvgStoNSlowWide = 0;
float dblAvgStoNFastWide = 0;
// First narrow band (~94Hz)
SortSignals(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
if (intLastStart == intStart && intLastStop == intStop)
{
dblAvgStoNSlowNarrow = (1 - dblSlowAlpha) * dblAvgStoNSlowNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
dblAvgStoNFastNarrow = (1 - dblFastAlpha) * dblAvgStoNFastNarrow + dblFastAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
}
else
{
dblAvgStoNSlowNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
dblAvgStoNFastNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
intLastStart = intStart;
intLastStop = intStop;
}
dblAvgStoNNarrow = max(dblAvgStoNSlowNarrow, dblAvgStoNFastNarrow); // computes fast attack, slow release
// Wide band (66% ofr current bandwidth)
SortSignals(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
if (intLastStart == intStart && intLastStop == intStop)
{
dblAvgStoNSlowWide = (1 - dblSlowAlpha) * dblAvgStoNSlowWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
dblAvgStoNFastWide = (1 - dblFastAlpha) * dblAvgStoNFastWide + dblFastAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
}
else
{
dblAvgStoNSlowWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
dblAvgStoNFastWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
intLastStart = intStart;
intLastStop = intStop;
}
dblAvgStoNNarrow = max(dblAvgStoNSlowNarrow, dblAvgStoNFastNarrow); // computes fast attack, slow release
dblAvgStoNWide = max(dblAvgStoNSlowWide, dblAvgStoNFastWide); // computes fast attack, slow release
// Preliminary calibration...future a function of bandwidth and BusyDet.
switch (ARQBandwidth)
{
case B200MAX:
case B200FORCED:
if (dblAvgStoNNarrow > 1.5 * BusyDet|| dblAvgStoNWide > 2.5 * BusyDet)
blnBusy = True;
break;
case B500MAX:
case B500FORCED:
if (dblAvgStoNNarrow > 1.5 * BusyDet || dblAvgStoNWide > 2.5 * BusyDet)
blnBusy = True;
break;
case B1000MAX:
case B1000FORCED:
if (dblAvgStoNNarrow > 1.4 * BusyDet || dblAvgStoNWide > 2 * BusyDet)
blnBusy = True;
break;
case B2000MAX:
case B2000FORCED:
if (dblAvgStoNNarrow > 1.4 * BusyDet || dblAvgStoNWide > 2 * BusyDet)
blnBusy = True;
}
if (blnBusy) // This used to skip over one call busy nuisance trips. Busy must be present at least 2 consecutive times to be reported
{
intBusyOnCnt += 1;
intBusyOffCnt = 0;
if (intBusyOnCnt > 1)
blnBusy = True;
else if (!blnBusy)
{
intBusyOffCnt += 1;
intBusyOnCnt = 0;
if (intBusyOffCnt > 3)
blnBusy = False;
}
}
if (blnLastBusy == False && blnBusy)
{
int x = round(dblAvgStoNNarrow); // odd, but PI doesnt print floats properly
int y = round(dblAvgStoNWide);
blnLastBusy = True;
LastBusyOn = Now;
#ifdef __ARM_ARCH
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY ON StoN Narrow = %d StoN Wide %d", x, y);
#else
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY ON StoN Narrow = %f StoN Wide %f", dblAvgStoNNarrow, dblAvgStoNWide);
#endif
}
else if (blnLastBusy == True && !blnBusy)
{
int x = round(dblAvgStoNNarrow); // odd, but PI doesnt print floats properly
int y = round(dblAvgStoNWide);
blnLastBusy = False;
LastBusyOff = Now;
#ifdef __ARM_ARCH
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY OFF StoN Narrow = %d StoN Wide %d", x, y);
#else
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY OFF StoN Narrow = %f StoN Wide %f", dblAvgStoNNarrow, dblAvgStoNWide);
#endif
}
return blnLastBusy;
}
*/
BOOL BusyDetect3(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
{
// each bin is about 12000/1024 or 11.72 Hz
// this only called while searching for leader ...once leader detected, no longer called.
// First sort signals and look at highes signals:baseline ratio..
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
float dblSlowAlpha = 0.2f;
float dblAvgStoNNarrow = 0, dblAvgStoNWide = 0;
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
int blnBusy = FALSE;
int BusyDet4th = BusyDet * BusyDet * BusyDet * BusyDet;
// First sort signals and look at highest signals:baseline ratio..
// First narrow band (~94Hz)
SortSignals2(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
if (intLastStart == intStart && intLastStop == intStop)
dblAvgStoNNarrow = (1 - dblSlowAlpha) * dblAvgStoNNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
else
{
// This initializes the Narrow average after a bandwidth change
dblAvgStoNNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
intLastStart = intStart;
intLastStop = intStop;
}
// Wide band (66% of current bandwidth)
SortSignals2(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
if (intLastStart == intStart && intLastStop == intStop)
dblAvgStoNWide = (1 - dblSlowAlpha) * dblAvgStoNWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
else
{
// This initializes the Wide average after a bandwidth change
dblAvgStoNWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
intLastStart = intStart;
intLastStop = intStop;
}
// Preliminary calibration...future a function of bandwidth and BusyDet.
switch (ARQBandwidth)
{
case XB200:
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th)) || (dblAvgStoNWide > (5 + 0.02 * BusyDet4th));
break;
case XB500:
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th) )|| (dblAvgStoNWide > (5 + 0.02 * BusyDet4th));
break;
case XB2500:
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th)) || (dblAvgStoNWide > (5 + 0.016 * BusyDet4th));
}
if (BusyDet == 0)
blnBusy = FALSE; // 0 Disables check ?? Is this the best place to do this?
// WriteDebugLog(LOGDEBUG, "Busy %d Wide %f Narrow %f", blnBusy, dblAvgStoNWide, dblAvgStoNNarrow);
if (blnBusy)
{
// This requires multiple adjacent busy conditions to skip over one nuisance Busy trips.
// Busy must be present at least 3 consecutive times ( ~250 ms) to be reported
intBusyOnCnt += 1;
intBusyOffCnt = 0;
if (intBusyOnCnt > 3)
dttLastTrip = Now;
}
else
{
intBusyOffCnt += 1;
intBusyOnCnt = 0;
}
if (blnLastBusy == False && intBusyOnCnt >= 3)
{
dttPriorLastBusyTrip = dttLastBusyTrip; // save old dttLastBusyTrip for use in BUSYBLOCKING function
dttLastBusyTrip = Now;
blnLastBusy = True;
}
else
{
if (blnLastBusy && (Now - dttLastTrip) > intHoldMs && intBusyOffCnt >= 3)
{
dttLastBusyClear = Now;
blnLastBusy = False;
}
}
return blnLastBusy;
}
VOID SortSignals(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin)
{
// puts the top intNumber of bins between intStartBin and intStopBin into dblAVGSignalPerBin, the rest into dblAvgBaselinePerBin
// for decent accuracy intNumBins should be < 75% of intStopBin-intStartBin)
float dblAVGSignal[200] = {0};//intNumBins
float dblAVGBaseline[200] = {0};//intStopBin - intStartBin - intNumBins
float dblSigSum = 0;
float dblTotalSum = 0;
int intSigPtr = 0;
int intBasePtr = 0;
int i, j, k;
for (i = 0; i < intNumBins; i++)
{
for (j = intStartBin; j <= intStopBin; j++)
{
if (i == 0)
{
dblTotalSum += dblMag[j];
if (dblMag[j] > dblAVGSignal[i])
dblAVGSignal[i] = dblMag[j];
}
else
{
if (dblMag[j] > dblAVGSignal[i] && dblMag[j] < dblAVGSignal[i - 1])
dblAVGSignal[i] = dblMag[j];
}
}
}
for(k = 0; k < intNumBins; k++)
{
dblSigSum += dblAVGSignal[k];
}
*dblAVGSignalPerBin = dblSigSum / intNumBins;
*dblAVGBaselinePerBin = (dblTotalSum - dblSigSum) / (intStopBin - intStartBin - intNumBins + 1);
}
BOOL compare(const void *p1, const void *p2)
{
float x = *(const float *)p1;
float y = *(const float *)p2;
if (x < y)
return -1; // Return -1 if you want ascending, 1 if you want descending order.
else if (x > y)
return 1; // Return 1 if you want ascending, -1 if you want descending order.
return 0;
}
VOID SortSignals2(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin)
{
// puts the top intNumber of bins between intStartBin and intStopBin into dblAVGSignalPerBin, the rest into dblAvgBaselinePerBin
// for decent accuracy intNumBins should be < 75% of intStopBin-intStartBin)
// This version uses a native sort function which is much faster and reduces CPU loading significantly on wide bandwidths.
float dblSort[202];
float dblSum1 = 0, dblSum2 = 0;
int numtoSort = (intStopBin - intStartBin) + 1, i;
memcpy(dblSort, &dblMag[intStartBin], numtoSort * sizeof(float));
qsort((void *)dblSort, numtoSort, sizeof(float), compare);
for (i = numtoSort -1; i >= 0; i--)
{
if (i >= (numtoSort - intNumBins))
dblSum1 += dblSort[i];
else
dblSum2 += dblSort[i];
}
*dblAVGSignalPerBin = dblSum1 / intNumBins;
*dblAVGBaselinePerBin = dblSum2 / (intStopBin - intStartBin - intNumBins - 1);
}

View file

@ -1,159 +1,159 @@
#include "UZ7HOStuff.h"
// if in Satellite Mode look for a Tuning signal
// As a first try, use ardop leader pattern then single tone
static short rawSamples[2400]; // Get Frame Type need 2400 and we may add 1200
static int rawSamplesLength = 0;
static int maxrawSamplesLength;
static float dblOffsetHz = 0;;
static int blnLeaderFound = 0;
enum _ReceiveState // used for initial receive testing...later put in correct protocol states
{
SearchingForLeader,
AcquireSymbolSync,
AcquireFrameSync,
AcquireFrameType,
DecodeFrameType,
AcquireFrame,
DecodeFramestate
};
static enum _ReceiveState State;
void LookForCalPattern(short * Samples, int nSamples);
void doTuning(short * Samples, int nSamples)
{
short ardopbuff[2][1200];
int i, i1 = 0;
if (UsingBothChannels)
{
for (i = 0; i < rx_bufsize; i++)
{
ardopbuff[0][i] = Samples[i1];
i1++;
ardopbuff[1][i] = Samples[i1];
i1++;
}
}
else if (UsingRight)
{
// Extract just right
i1 = 1;
for (i = 0; i < rx_bufsize; i++)
{
ardopbuff[1][i] = Samples[i1];
i1 += 2;
}
}
else
{
// Extract just left
for (i = 0; i < rx_bufsize; i++)
{
ardopbuff[0][i] = Samples[i1];
i1 += 2;
}
}
if (UsingLeft)
{
LookForCalPattern(&ardopbuff[0][0], 0);
}
if (UsingRight)
{
LookForCalPattern(&ardopbuff[0][0], 1);
}
}
void LookForCalPattern(short * Samples, int nSamples)
{
BOOL blnFrameDecodedOK = FALSE;
// LookforUZ7HOLeader(Samples, nSamples);
// printtick("Start afsk");
// DemodAFSK(Samples, nSamples);
// printtick("End afsk");
// return;
// Append new data to anything in rawSamples
memcpy(&rawSamples[rawSamplesLength], Samples, nSamples * 2);
rawSamplesLength += nSamples;
if (rawSamplesLength > maxrawSamplesLength)
maxrawSamplesLength = rawSamplesLength;
if (rawSamplesLength >= 2400)
Debugprintf("Corrupt rawSamplesLength %d", rawSamplesLength);
nSamples = rawSamplesLength;
Samples = rawSamples;
rawSamplesLength = 0;
// printtick("Start Busy");
if (nSamples >= 1024)
UpdateBusyDetector(Samples);
// printtick("Done Busy");
// it seems that searchforleader runs on unmixed and unfilered samples
// Searching for leader
if (State == SearchingForLeader)
{
// Search for leader as long as 960 samples (8 symbols) available
// printtick("Start Leader Search");
while (State == SearchingForLeader && nSamples >= 1200)
{
int intSN;
blnLeaderFound = SearchFor2ToneLeader4(Samples, nSamples, &dblOffsetHz, &intSN);
// blnLeaderFound = SearchFor2ToneLeader2(Samples, nSamples, &dblOffsetHz, &intSN);
if (blnLeaderFound)
{
// Debugprintf("Got Leader");
nSamples -= 480;
Samples += 480; // !!!! needs attention !!!
}
else
{
nSamples -= 240;
Samples += 240; // !!!! needs attention !!!
}
}
if (State == SearchingForLeader)
{
// Save unused samples
memmove(rawSamples, Samples, nSamples * 2);
rawSamplesLength = nSamples;
// printtick("End Leader Search");
return;
}
}
}
#include "UZ7HOStuff.h"
// if in Satellite Mode look for a Tuning signal
// As a first try, use ardop leader pattern then single tone
static short rawSamples[2400]; // Get Frame Type need 2400 and we may add 1200
static int rawSamplesLength = 0;
static int maxrawSamplesLength;
static float dblOffsetHz = 0;;
static int blnLeaderFound = 0;
enum _ReceiveState // used for initial receive testing...later put in correct protocol states
{
SearchingForLeader,
AcquireSymbolSync,
AcquireFrameSync,
AcquireFrameType,
DecodeFrameType,
AcquireFrame,
DecodeFramestate
};
static enum _ReceiveState State;
void LookForCalPattern(short * Samples, int nSamples);
void doTuning(short * Samples, int nSamples)
{
short ardopbuff[2][1200];
int i, i1 = 0;
if (UsingBothChannels)
{
for (i = 0; i < rx_bufsize; i++)
{
ardopbuff[0][i] = Samples[i1];
i1++;
ardopbuff[1][i] = Samples[i1];
i1++;
}
}
else if (UsingRight)
{
// Extract just right
i1 = 1;
for (i = 0; i < rx_bufsize; i++)
{
ardopbuff[1][i] = Samples[i1];
i1 += 2;
}
}
else
{
// Extract just left
for (i = 0; i < rx_bufsize; i++)
{
ardopbuff[0][i] = Samples[i1];
i1 += 2;
}
}
if (UsingLeft)
{
LookForCalPattern(&ardopbuff[0][0], 0);
}
if (UsingRight)
{
LookForCalPattern(&ardopbuff[0][0], 1);
}
}
void LookForCalPattern(short * Samples, int nSamples)
{
BOOL blnFrameDecodedOK = FALSE;
// LookforUZ7HOLeader(Samples, nSamples);
// printtick("Start afsk");
// DemodAFSK(Samples, nSamples);
// printtick("End afsk");
// return;
// Append new data to anything in rawSamples
memcpy(&rawSamples[rawSamplesLength], Samples, nSamples * 2);
rawSamplesLength += nSamples;
if (rawSamplesLength > maxrawSamplesLength)
maxrawSamplesLength = rawSamplesLength;
if (rawSamplesLength >= 2400)
Debugprintf("Corrupt rawSamplesLength %d", rawSamplesLength);
nSamples = rawSamplesLength;
Samples = rawSamples;
rawSamplesLength = 0;
// printtick("Start Busy");
if (nSamples >= 1024)
UpdateBusyDetector(Samples);
// printtick("Done Busy");
// it seems that searchforleader runs on unmixed and unfilered samples
// Searching for leader
if (State == SearchingForLeader)
{
// Search for leader as long as 960 samples (8 symbols) available
// printtick("Start Leader Search");
while (State == SearchingForLeader && nSamples >= 1200)
{
int intSN;
blnLeaderFound = SearchFor2ToneLeader4(Samples, nSamples, &dblOffsetHz, &intSN);
// blnLeaderFound = SearchFor2ToneLeader2(Samples, nSamples, &dblOffsetHz, &intSN);
if (blnLeaderFound)
{
// Debugprintf("Got Leader");
nSamples -= 480;
Samples += 480; // !!!! needs attention !!!
}
else
{
nSamples -= 240;
Samples += 240; // !!!! needs attention !!!
}
}
if (State == SearchingForLeader)
{
// Save unused samples
memmove(rawSamples, Samples, nSamples * 2);
rawSamplesLength = nSamples;
// printtick("End Leader Search");
return;
}
}
}

View file

@ -1,439 +1,439 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include <QSettings>
#include "UZ7HOStuff.h"
extern "C" void get_exclude_list(char * line, TStringList * list);
extern "C" void get_exclude_frm(char * line, TStringList * list);
extern "C" int SoundMode;
extern "C" int RX_SR;
extern "C" int TX_SR;
extern "C" int multiCore;
extern "C" word MEMRecovery[5];
extern int MintoTray;
extern "C" int UDPClientPort;
extern "C" int UDPServerPort;
extern "C" int TXPort;
extern char UDPHost[64];
extern char CWIDCall[128];
extern int CWIDInterval;
extern int CWIDLeft;
extern int CWIDRight;
extern int CWIDType;
extern "C" int RSID_SABM[4];
extern "C" int RSID_UI[4];
extern "C" int RSID_SetModem[4];
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
// This makes geting settings for more channels easier
char Prefix[16] = "AX25_A";
void GetPortSettings(int Chan);
QVariant getAX25Param(const char * key, QVariant Default)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
return settings->value(fullKey, Default);
}
void getAX25Params(int chan)
{
Prefix[5] = chan + 'A';
GetPortSettings(chan);
}
void GetPortSettings(int Chan)
{
tx_hitoneraisedb[Chan] = getAX25Param("HiToneRaise", 0).toInt();
maxframe[Chan] = getAX25Param("Maxframe", 3).toInt();
fracks[Chan] = getAX25Param("Retries", 15).toInt();
frack_time[Chan] = getAX25Param("FrackTime", 5).toInt();
idletime[Chan] = getAX25Param("IdleTime", 180).toInt();
slottime[Chan] = getAX25Param("SlotTime", 100).toInt();
persist[Chan] = getAX25Param("Persist", 128).toInt();
resptime[Chan] = getAX25Param("RespTime", 1500).toInt();
TXFrmMode[Chan] = getAX25Param("TXFrmMode", 1).toInt();
max_frame_collector[Chan] = getAX25Param("FrameCollector", 6).toInt();
//exclude_callsigns[Chan]= getAX25Param("ExcludeCallsigns/");
//exclude_APRS_frm[Chan]= getAX25Param("ExcludeAPRSFrmType/");
KISS_opt[Chan] = getAX25Param("KISSOptimization", false).toInt();;
dyn_frack[Chan] = getAX25Param("DynamicFrack", false).toInt();;
recovery[Chan] = getAX25Param("BitRecovery", 0).toInt();
NonAX25[Chan] = getAX25Param("NonAX25Frm", false).toInt();;
MEMRecovery[Chan]= getAX25Param("MEMRecovery", 200).toInt();
IPOLL[Chan] = getAX25Param("IPOLL", 80).toInt();
strcpy(MyDigiCall[Chan], getAX25Param("MyDigiCall", "").toString().toUtf8());
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
il2p_mode[Chan] = getAX25Param("IL2P", IL2P_MODE_NONE).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();
}
void getSettings()
{
int snd_ch;
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->sync();
SoundMode = settings->value("Init/SoundMode", 0).toInt();
UDPClientPort = settings->value("Init/UDPClientPort", 8888).toInt();
UDPServerPort = settings->value("Init/UDPServerPort", 8884).toInt();
TXPort = settings->value("Init/TXPort", UDPServerPort).toInt();
strcpy(UDPHost, settings->value("Init/UDPHost", "192.168.1.255").toString().toUtf8());
UDPServ = settings->value("Init/UDPServer", FALSE).toBool();
RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
strcpy(CaptureDevice, settings->value("Init/SndRXDeviceName", "hw:1,0").toString().toUtf8());
strcpy(PlaybackDevice, settings->value("Init/SndTXDeviceName", "hw:1,0").toString().toUtf8());
raduga = settings->value("Init/DispMode", DISP_RGB).toInt();
strcpy(PTTPort, settings->value("Init/PTT", "").toString().toUtf8());
PTTMode = settings->value("Init/PTTMode", 19200).toInt();
PTTBAUD = settings->value("Init/PTTBAUD", 19200).toInt();
strcpy(PTTOnString, settings->value("Init/PTTOnString", "").toString().toUtf8());
strcpy(PTTOffString, settings->value("Init/PTTOffString", "").toString().toUtf8());
pttGPIOPin = settings->value("Init/pttGPIOPin", 17).toInt();
pttGPIOPinR = settings->value("Init/pttGPIOPinR", 17).toInt();
#ifdef WIN32
strcpy(CM108Addr, settings->value("Init/CM108Addr", "0xD8C:0x08").toString().toUtf8());
#else
strcpy(CM108Addr, settings->value("Init/CM108Addr", "/dev/hidraw0").toString().toUtf8());
#endif
HamLibPort = settings->value("Init/HamLibPort", 4532).toInt();
strcpy(HamLibHost, settings->value("Init/HamLibHost", "127.0.0.1").toString().toUtf8());
DualPTT = settings->value("Init/DualPTT", 1).toInt();
TX_rotate = settings->value("Init/TXRotate", 0).toInt();
multiCore = settings->value("Init/multiCore", 0).toInt();
MintoTray = settings->value("Init/MinimizetoTray", 1).toInt();
rx_freq[0] = settings->value("Modem/RXFreq1", 1700).toInt();
rx_freq[1] = settings->value("Modem/RXFreq2", 1700).toInt();
rx_freq[2] = settings->value("Modem/RXFreq3", 1700).toInt();
rx_freq[3] = settings->value("Modem/RXFreq4", 1700).toInt();
rcvr_offset[0] = settings->value("Modem/RcvrShift1", 30).toInt();
rcvr_offset[1] = settings->value("Modem/RcvrShift2", 30).toInt();
rcvr_offset[2] = settings->value("Modem/RcvrShift3", 30).toInt();
rcvr_offset[3] = settings->value("Modem/RcvrShift4", 30).toInt();
speed[0] = settings->value("Modem/ModemType1", SPEED_1200).toInt();
speed[1] = settings->value("Modem/ModemType2", SPEED_1200).toInt();
speed[2] = settings->value("Modem/ModemType3", SPEED_1200).toInt();
speed[3] = settings->value("Modem/ModemType4", SPEED_1200).toInt();
RCVR[0] = settings->value("Modem/NRRcvrPairs1", 0).toInt();;
RCVR[1] = settings->value("Modem/NRRcvrPairs2", 0).toInt();;
RCVR[2] = settings->value("Modem/NRRcvrPairs3", 0).toInt();;
RCVR[3] = settings->value("Modem/NRRcvrPairs4", 0).toInt();;
soundChannel[0] = settings->value("Modem/soundChannel1", 1).toInt();
soundChannel[1] = settings->value("Modem/soundChannel2", 0).toInt();
soundChannel[2] = settings->value("Modem/soundChannel3", 0).toInt();
soundChannel[3] = settings->value("Modem/soundChannel4", 0).toInt();
SCO = settings->value("Init/SCO", 0).toInt();
dcd_threshold = settings->value("Modem/DCDThreshold", 40).toInt();
rxOffset = settings->value("Modem/rxOffset", 0).toInt();
AGWServ = settings->value("AGWHost/Server", TRUE).toBool();
AGWPort = settings->value("AGWHost/Port", 8000).toInt();
KISSServ = settings->value("KISS/Server", FALSE).toBool();
KISSPort = settings->value("KISS/Port", 8105).toInt();
RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
emph_all[0] = settings->value("Modem/PreEmphasisAll1", FALSE).toBool();
emph_all[1] = settings->value("Modem/PreEmphasisAll2", FALSE).toBool();
emph_all[2] = settings->value("Modem/PreEmphasisAll3", FALSE).toBool();
emph_all[3] = settings->value("Modem/PreEmphasisAll4", FALSE).toBool();
emph_db[0] = settings->value("Modem/PreEmphasisDB1", 0).toInt();
emph_db[1] = settings->value("Modem/PreEmphasisDB2", 0).toInt();
emph_db[2] = settings->value("Modem/PreEmphasisDB3", 0).toInt();
emph_db[3] = settings->value("Modem/PreEmphasisDB4", 0).toInt();
Firstwaterfall = settings->value("Window/Waterfall1", TRUE).toInt();
Secondwaterfall = settings->value("Window/Waterfall2", TRUE).toInt();
txdelay[0] = settings->value("Modem/TxDelay1", 250).toInt();
txdelay[1] = settings->value("Modem/TxDelay2", 250).toInt();
txdelay[2] = settings->value("Modem/TxDelay3", 250).toInt();
txdelay[3] = settings->value("Modem/TxDelay4", 250).toInt();
strcpy(CWIDCall, settings->value("Modem/CWIDCall", "").toString().toUtf8().toUpper());
CWIDInterval = settings->value("Modem/CWIDInterval", 0).toInt();
CWIDLeft = settings->value("Modem/CWIDLeft", 0).toInt();
CWIDRight = settings->value("Modem/CWIDRight", 0).toInt();
CWIDType = settings->value("Modem/CWIDType", 1).toInt(); // on/off
getAX25Params(0);
getAX25Params(1);
getAX25Params(2);
getAX25Params(3);
// Validate and process settings
UsingLeft = 0;
UsingRight = 0;
UsingBothChannels = 0;
for (int i = 0; i < 4; i++)
{
if (soundChannel[i] == LEFT)
{
UsingLeft = 1;
modemtoSoundLR[i] = 0;
}
else if (soundChannel[i] == RIGHT)
{
UsingRight = 1;
modemtoSoundLR[i] = 1;
}
}
if (UsingLeft && UsingRight)
UsingBothChannels = 1;
for (snd_ch = 0; snd_ch < 4; snd_ch++)
{
tx_hitoneraise[snd_ch] = powf(10.0f, -abs(tx_hitoneraisedb[snd_ch]) / 20.0f);
if (IPOLL[snd_ch] < 0)
IPOLL[snd_ch] = 0;
else if (IPOLL[snd_ch] > 65535)
IPOLL[snd_ch] = 65535;
if (MEMRecovery[snd_ch] < 1)
MEMRecovery[snd_ch] = 1;
// if (MEMRecovery[snd_ch]> 65535)
// MEMRecovery[snd_ch]= 65535;
/*
if resptime[snd_ch] < 0 then resptime[snd_ch]= 0;
if resptime[snd_ch] > 65535 then resptime[snd_ch]= 65535;
if persist[snd_ch] > 255 then persist[snd_ch]= 255;
if persist[snd_ch] < 32 then persist[snd_ch]= 32;
if fracks[snd_ch] < 1 then fracks[snd_ch]= 1;
if frack_time[snd_ch] < 1 then frack_time[snd_ch]= 1;
if idletime[snd_ch] < frack_time[snd_ch] then idletime[snd_ch]= 180;
*/
if (emph_db[snd_ch] < 0 || emph_db[snd_ch] > nr_emph)
emph_db[snd_ch] = 0;
if (max_frame_collector[snd_ch] > 6) max_frame_collector[snd_ch] = 6;
if (maxframe[snd_ch] == 0 || maxframe[snd_ch] > 7) maxframe[snd_ch] = 3;
if (qpsk_set[snd_ch].mode > 1) qpsk_set[snd_ch].mode = 0;
}
delete(settings);
}
void SavePortSettings(int Chan);
void saveAX25Param(const char * key, QVariant Value)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
settings->setValue(fullKey, Value);
}
void saveAX25Params(int chan)
{
Prefix[5] = chan + 'A';
SavePortSettings(chan);
}
void SavePortSettings(int Chan)
{
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("HiToneRaise", tx_hitoneraisedb[Chan]);
saveAX25Param("Maxframe",maxframe[Chan]);
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("FrackTime", frack_time[Chan]);
saveAX25Param("IdleTime", idletime[Chan]);
saveAX25Param("SlotTime", slottime[Chan]);
saveAX25Param("Persist", persist[Chan]);
saveAX25Param("RespTime", resptime[Chan]);
saveAX25Param("TXFrmMode", TXFrmMode[Chan]);
saveAX25Param("FrameCollector", max_frame_collector[Chan]);
saveAX25Param("ExcludeCallsigns", exclude_callsigns[Chan]);
saveAX25Param("ExcludeAPRSFrmType", exclude_APRS_frm[Chan]);
saveAX25Param("KISSOptimization", KISS_opt[Chan]);
saveAX25Param("DynamicFrack", dyn_frack[Chan]);
saveAX25Param("BitRecovery", recovery[Chan]);
saveAX25Param("NonAX25Frm", NonAX25[Chan]);
saveAX25Param("MEMRecovery", MEMRecovery[Chan]);
saveAX25Param("IPOLL", IPOLL[Chan]);
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
saveAX25Param("FX25", fx25_mode[Chan]);
saveAX25Param("IL2P", il2p_mode[Chan]);
saveAX25Param("RSID_UI", RSID_UI[Chan]);
saveAX25Param("RSID_SABM", RSID_SABM[Chan]);
saveAX25Param("RSID_SetModem", RSID_SetModem[Chan]);
}
void saveSettings()
{
QSettings * settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->setValue("Init/SoundMode", SoundMode);
settings->setValue("Init/UDPClientPort", UDPClientPort);
settings->setValue("Init/UDPServerPort", UDPServerPort);
settings->setValue("Init/TXPort", TXPort);
settings->setValue("Init/UDPServer", UDPServ);
settings->setValue("Init/UDPHost", UDPHost);
settings->setValue("Init/TXSampleRate", TX_SR);
settings->setValue("Init/RXSampleRate", RX_SR);
settings->setValue("Init/SndRXDeviceName", CaptureDevice);
settings->setValue("Init/SndTXDeviceName", PlaybackDevice);
settings->setValue("Init/SCO", SCO);
settings->setValue("Init/DualPTT", DualPTT);
settings->setValue("Init/TXRotate", TX_rotate);
settings->setValue("Init/DispMode", raduga);
settings->setValue("Init/PTT", PTTPort);
settings->setValue("Init/PTTBAUD", PTTBAUD);
settings->setValue("Init/PTTMode", PTTMode);
settings->setValue("Init/PTTOffString", PTTOffString);
settings->setValue("Init/PTTOnString", PTTOnString);
settings->setValue("Init/pttGPIOPin", pttGPIOPin);
settings->setValue("Init/pttGPIOPinR", pttGPIOPinR);
settings->setValue("Init/CM108Addr", CM108Addr);
settings->setValue("Init/HamLibPort", HamLibPort);
settings->setValue("Init/HamLibHost", HamLibHost);
settings->setValue("Init/MinimizetoTray", MintoTray);
settings->setValue("Init/multiCore", multiCore);
// Don't save freq on close as it could be offset by multiple decoders
settings->setValue("Modem/NRRcvrPairs1", RCVR[0]);
settings->setValue("Modem/NRRcvrPairs2", RCVR[1]);
settings->setValue("Modem/NRRcvrPairs3", RCVR[2]);
settings->setValue("Modem/NRRcvrPairs4", RCVR[3]);
settings->setValue("Modem/RcvrShift1", rcvr_offset[0]);
settings->setValue("Modem/RcvrShift2", rcvr_offset[1]);
settings->setValue("Modem/RcvrShift3", rcvr_offset[2]);
settings->setValue("Modem/RcvrShift4", rcvr_offset[3]);
settings->setValue("Modem/ModemType1", speed[0]);
settings->setValue("Modem/ModemType2", speed[1]);
settings->setValue("Modem/ModemType3", speed[2]);
settings->setValue("Modem/ModemType4", speed[3]);
settings->setValue("Modem/soundChannel1", soundChannel[0]);
settings->setValue("Modem/soundChannel2", soundChannel[1]);
settings->setValue("Modem/soundChannel3", soundChannel[2]);
settings->setValue("Modem/soundChannel4", soundChannel[3]);
settings->setValue("Modem/DCDThreshold", dcd_threshold);
settings->setValue("Modem/rxOffset", rxOffset);
settings->setValue("AGWHost/Server", AGWServ);
settings->setValue("AGWHost/Port", AGWPort);
settings->setValue("KISS/Server", KISSServ);
settings->setValue("KISS/Port", KISSPort);
settings->setValue("Modem/PreEmphasisAll1", emph_all[0]);
settings->setValue("Modem/PreEmphasisAll2", emph_all[1]);
settings->setValue("Modem/PreEmphasisAll3", emph_all[2]);
settings->setValue("Modem/PreEmphasisAll4", emph_all[3]);
settings->setValue("Modem/PreEmphasisDB1", emph_db[0]);
settings->setValue("Modem/PreEmphasisDB2", emph_db[1]);
settings->setValue("Modem/PreEmphasisDB3", emph_db[2]);
settings->setValue("Modem/PreEmphasisDB4", emph_db[3]);
settings->setValue("Window/Waterfall1", Firstwaterfall);
settings->setValue("Window/Waterfall2", Secondwaterfall);
settings->setValue("Modem/TxDelay1", txdelay[0]);
settings->setValue("Modem/TxDelay2", txdelay[1]);
settings->setValue("Modem/TxDelay3", txdelay[2]);
settings->setValue("Modem/TxDelay4", txdelay[3]);
settings->setValue("Modem/TxTail1", txtail[0]);
settings->setValue("Modem/TxTail2", txtail[1]);
settings->setValue("Modem/TxTail3", txtail[2]);
settings->setValue("Modem/TxTail4", txtail[3]);
settings->setValue("Modem/CWIDCall", CWIDCall);
settings->setValue("Modem/CWIDInterval", CWIDInterval);
settings->setValue("Modem/CWIDLeft", CWIDLeft);
settings->setValue("Modem/CWIDRight", CWIDRight);
settings->setValue("Modem/CWIDType", CWIDType);
saveAX25Params(0);
saveAX25Params(1);
saveAX25Params(2);
saveAX25Params(3);
settings->sync();
delete(settings);
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include <QSettings>
#include "UZ7HOStuff.h"
extern "C" void get_exclude_list(char * line, TStringList * list);
extern "C" void get_exclude_frm(char * line, TStringList * list);
extern "C" int SoundMode;
extern "C" int RX_SR;
extern "C" int TX_SR;
extern "C" int multiCore;
extern "C" word MEMRecovery[5];
extern int MintoTray;
extern "C" int UDPClientPort;
extern "C" int UDPServerPort;
extern "C" int TXPort;
extern char UDPHost[64];
extern char CWIDCall[128];
extern int CWIDInterval;
extern int CWIDLeft;
extern int CWIDRight;
extern int CWIDType;
extern "C" int RSID_SABM[4];
extern "C" int RSID_UI[4];
extern "C" int RSID_SetModem[4];
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
// This makes geting settings for more channels easier
char Prefix[16] = "AX25_A";
void GetPortSettings(int Chan);
QVariant getAX25Param(const char * key, QVariant Default)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
return settings->value(fullKey, Default);
}
void getAX25Params(int chan)
{
Prefix[5] = chan + 'A';
GetPortSettings(chan);
}
void GetPortSettings(int Chan)
{
tx_hitoneraisedb[Chan] = getAX25Param("HiToneRaise", 0).toInt();
maxframe[Chan] = getAX25Param("Maxframe", 3).toInt();
fracks[Chan] = getAX25Param("Retries", 15).toInt();
frack_time[Chan] = getAX25Param("FrackTime", 5).toInt();
idletime[Chan] = getAX25Param("IdleTime", 180).toInt();
slottime[Chan] = getAX25Param("SlotTime", 100).toInt();
persist[Chan] = getAX25Param("Persist", 128).toInt();
resptime[Chan] = getAX25Param("RespTime", 1500).toInt();
TXFrmMode[Chan] = getAX25Param("TXFrmMode", 1).toInt();
max_frame_collector[Chan] = getAX25Param("FrameCollector", 6).toInt();
//exclude_callsigns[Chan]= getAX25Param("ExcludeCallsigns/");
//exclude_APRS_frm[Chan]= getAX25Param("ExcludeAPRSFrmType/");
KISS_opt[Chan] = getAX25Param("KISSOptimization", false).toInt();;
dyn_frack[Chan] = getAX25Param("DynamicFrack", false).toInt();;
recovery[Chan] = getAX25Param("BitRecovery", 0).toInt();
NonAX25[Chan] = getAX25Param("NonAX25Frm", false).toInt();;
MEMRecovery[Chan]= getAX25Param("MEMRecovery", 200).toInt();
IPOLL[Chan] = getAX25Param("IPOLL", 80).toInt();
strcpy(MyDigiCall[Chan], getAX25Param("MyDigiCall", "").toString().toUtf8());
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
il2p_mode[Chan] = getAX25Param("IL2P", IL2P_MODE_NONE).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();
}
void getSettings()
{
int snd_ch;
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->sync();
SoundMode = settings->value("Init/SoundMode", 0).toInt();
UDPClientPort = settings->value("Init/UDPClientPort", 8888).toInt();
UDPServerPort = settings->value("Init/UDPServerPort", 8884).toInt();
TXPort = settings->value("Init/TXPort", UDPServerPort).toInt();
strcpy(UDPHost, settings->value("Init/UDPHost", "192.168.1.255").toString().toUtf8());
UDPServ = settings->value("Init/UDPServer", FALSE).toBool();
RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
strcpy(CaptureDevice, settings->value("Init/SndRXDeviceName", "hw:1,0").toString().toUtf8());
strcpy(PlaybackDevice, settings->value("Init/SndTXDeviceName", "hw:1,0").toString().toUtf8());
raduga = settings->value("Init/DispMode", DISP_RGB).toInt();
strcpy(PTTPort, settings->value("Init/PTT", "").toString().toUtf8());
PTTMode = settings->value("Init/PTTMode", 19200).toInt();
PTTBAUD = settings->value("Init/PTTBAUD", 19200).toInt();
strcpy(PTTOnString, settings->value("Init/PTTOnString", "").toString().toUtf8());
strcpy(PTTOffString, settings->value("Init/PTTOffString", "").toString().toUtf8());
pttGPIOPin = settings->value("Init/pttGPIOPin", 17).toInt();
pttGPIOPinR = settings->value("Init/pttGPIOPinR", 17).toInt();
#ifdef WIN32
strcpy(CM108Addr, settings->value("Init/CM108Addr", "0xD8C:0x08").toString().toUtf8());
#else
strcpy(CM108Addr, settings->value("Init/CM108Addr", "/dev/hidraw0").toString().toUtf8());
#endif
HamLibPort = settings->value("Init/HamLibPort", 4532).toInt();
strcpy(HamLibHost, settings->value("Init/HamLibHost", "127.0.0.1").toString().toUtf8());
DualPTT = settings->value("Init/DualPTT", 1).toInt();
TX_rotate = settings->value("Init/TXRotate", 0).toInt();
multiCore = settings->value("Init/multiCore", 0).toInt();
MintoTray = settings->value("Init/MinimizetoTray", 1).toInt();
rx_freq[0] = settings->value("Modem/RXFreq1", 1700).toInt();
rx_freq[1] = settings->value("Modem/RXFreq2", 1700).toInt();
rx_freq[2] = settings->value("Modem/RXFreq3", 1700).toInt();
rx_freq[3] = settings->value("Modem/RXFreq4", 1700).toInt();
rcvr_offset[0] = settings->value("Modem/RcvrShift1", 30).toInt();
rcvr_offset[1] = settings->value("Modem/RcvrShift2", 30).toInt();
rcvr_offset[2] = settings->value("Modem/RcvrShift3", 30).toInt();
rcvr_offset[3] = settings->value("Modem/RcvrShift4", 30).toInt();
speed[0] = settings->value("Modem/ModemType1", SPEED_1200).toInt();
speed[1] = settings->value("Modem/ModemType2", SPEED_1200).toInt();
speed[2] = settings->value("Modem/ModemType3", SPEED_1200).toInt();
speed[3] = settings->value("Modem/ModemType4", SPEED_1200).toInt();
RCVR[0] = settings->value("Modem/NRRcvrPairs1", 0).toInt();;
RCVR[1] = settings->value("Modem/NRRcvrPairs2", 0).toInt();;
RCVR[2] = settings->value("Modem/NRRcvrPairs3", 0).toInt();;
RCVR[3] = settings->value("Modem/NRRcvrPairs4", 0).toInt();;
soundChannel[0] = settings->value("Modem/soundChannel1", 1).toInt();
soundChannel[1] = settings->value("Modem/soundChannel2", 0).toInt();
soundChannel[2] = settings->value("Modem/soundChannel3", 0).toInt();
soundChannel[3] = settings->value("Modem/soundChannel4", 0).toInt();
SCO = settings->value("Init/SCO", 0).toInt();
dcd_threshold = settings->value("Modem/DCDThreshold", 40).toInt();
rxOffset = settings->value("Modem/rxOffset", 0).toInt();
AGWServ = settings->value("AGWHost/Server", TRUE).toBool();
AGWPort = settings->value("AGWHost/Port", 8000).toInt();
KISSServ = settings->value("KISS/Server", FALSE).toBool();
KISSPort = settings->value("KISS/Port", 8105).toInt();
RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
emph_all[0] = settings->value("Modem/PreEmphasisAll1", FALSE).toBool();
emph_all[1] = settings->value("Modem/PreEmphasisAll2", FALSE).toBool();
emph_all[2] = settings->value("Modem/PreEmphasisAll3", FALSE).toBool();
emph_all[3] = settings->value("Modem/PreEmphasisAll4", FALSE).toBool();
emph_db[0] = settings->value("Modem/PreEmphasisDB1", 0).toInt();
emph_db[1] = settings->value("Modem/PreEmphasisDB2", 0).toInt();
emph_db[2] = settings->value("Modem/PreEmphasisDB3", 0).toInt();
emph_db[3] = settings->value("Modem/PreEmphasisDB4", 0).toInt();
Firstwaterfall = settings->value("Window/Waterfall1", TRUE).toInt();
Secondwaterfall = settings->value("Window/Waterfall2", TRUE).toInt();
txdelay[0] = settings->value("Modem/TxDelay1", 250).toInt();
txdelay[1] = settings->value("Modem/TxDelay2", 250).toInt();
txdelay[2] = settings->value("Modem/TxDelay3", 250).toInt();
txdelay[3] = settings->value("Modem/TxDelay4", 250).toInt();
strcpy(CWIDCall, settings->value("Modem/CWIDCall", "").toString().toUtf8().toUpper());
CWIDInterval = settings->value("Modem/CWIDInterval", 0).toInt();
CWIDLeft = settings->value("Modem/CWIDLeft", 0).toInt();
CWIDRight = settings->value("Modem/CWIDRight", 0).toInt();
CWIDType = settings->value("Modem/CWIDType", 1).toInt(); // on/off
getAX25Params(0);
getAX25Params(1);
getAX25Params(2);
getAX25Params(3);
// Validate and process settings
UsingLeft = 0;
UsingRight = 0;
UsingBothChannels = 0;
for (int i = 0; i < 4; i++)
{
if (soundChannel[i] == LEFT)
{
UsingLeft = 1;
modemtoSoundLR[i] = 0;
}
else if (soundChannel[i] == RIGHT)
{
UsingRight = 1;
modemtoSoundLR[i] = 1;
}
}
if (UsingLeft && UsingRight)
UsingBothChannels = 1;
for (snd_ch = 0; snd_ch < 4; snd_ch++)
{
tx_hitoneraise[snd_ch] = powf(10.0f, -abs(tx_hitoneraisedb[snd_ch]) / 20.0f);
if (IPOLL[snd_ch] < 0)
IPOLL[snd_ch] = 0;
else if (IPOLL[snd_ch] > 65535)
IPOLL[snd_ch] = 65535;
if (MEMRecovery[snd_ch] < 1)
MEMRecovery[snd_ch] = 1;
// if (MEMRecovery[snd_ch]> 65535)
// MEMRecovery[snd_ch]= 65535;
/*
if resptime[snd_ch] < 0 then resptime[snd_ch]= 0;
if resptime[snd_ch] > 65535 then resptime[snd_ch]= 65535;
if persist[snd_ch] > 255 then persist[snd_ch]= 255;
if persist[snd_ch] < 32 then persist[snd_ch]= 32;
if fracks[snd_ch] < 1 then fracks[snd_ch]= 1;
if frack_time[snd_ch] < 1 then frack_time[snd_ch]= 1;
if idletime[snd_ch] < frack_time[snd_ch] then idletime[snd_ch]= 180;
*/
if (emph_db[snd_ch] < 0 || emph_db[snd_ch] > nr_emph)
emph_db[snd_ch] = 0;
if (max_frame_collector[snd_ch] > 6) max_frame_collector[snd_ch] = 6;
if (maxframe[snd_ch] == 0 || maxframe[snd_ch] > 7) maxframe[snd_ch] = 3;
if (qpsk_set[snd_ch].mode > 1) qpsk_set[snd_ch].mode = 0;
}
delete(settings);
}
void SavePortSettings(int Chan);
void saveAX25Param(const char * key, QVariant Value)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
settings->setValue(fullKey, Value);
}
void saveAX25Params(int chan)
{
Prefix[5] = chan + 'A';
SavePortSettings(chan);
}
void SavePortSettings(int Chan)
{
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("HiToneRaise", tx_hitoneraisedb[Chan]);
saveAX25Param("Maxframe",maxframe[Chan]);
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("FrackTime", frack_time[Chan]);
saveAX25Param("IdleTime", idletime[Chan]);
saveAX25Param("SlotTime", slottime[Chan]);
saveAX25Param("Persist", persist[Chan]);
saveAX25Param("RespTime", resptime[Chan]);
saveAX25Param("TXFrmMode", TXFrmMode[Chan]);
saveAX25Param("FrameCollector", max_frame_collector[Chan]);
saveAX25Param("ExcludeCallsigns", exclude_callsigns[Chan]);
saveAX25Param("ExcludeAPRSFrmType", exclude_APRS_frm[Chan]);
saveAX25Param("KISSOptimization", KISS_opt[Chan]);
saveAX25Param("DynamicFrack", dyn_frack[Chan]);
saveAX25Param("BitRecovery", recovery[Chan]);
saveAX25Param("NonAX25Frm", NonAX25[Chan]);
saveAX25Param("MEMRecovery", MEMRecovery[Chan]);
saveAX25Param("IPOLL", IPOLL[Chan]);
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
saveAX25Param("FX25", fx25_mode[Chan]);
saveAX25Param("IL2P", il2p_mode[Chan]);
saveAX25Param("RSID_UI", RSID_UI[Chan]);
saveAX25Param("RSID_SABM", RSID_SABM[Chan]);
saveAX25Param("RSID_SetModem", RSID_SetModem[Chan]);
}
void saveSettings()
{
QSettings * settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->setValue("Init/SoundMode", SoundMode);
settings->setValue("Init/UDPClientPort", UDPClientPort);
settings->setValue("Init/UDPServerPort", UDPServerPort);
settings->setValue("Init/TXPort", TXPort);
settings->setValue("Init/UDPServer", UDPServ);
settings->setValue("Init/UDPHost", UDPHost);
settings->setValue("Init/TXSampleRate", TX_SR);
settings->setValue("Init/RXSampleRate", RX_SR);
settings->setValue("Init/SndRXDeviceName", CaptureDevice);
settings->setValue("Init/SndTXDeviceName", PlaybackDevice);
settings->setValue("Init/SCO", SCO);
settings->setValue("Init/DualPTT", DualPTT);
settings->setValue("Init/TXRotate", TX_rotate);
settings->setValue("Init/DispMode", raduga);
settings->setValue("Init/PTT", PTTPort);
settings->setValue("Init/PTTBAUD", PTTBAUD);
settings->setValue("Init/PTTMode", PTTMode);
settings->setValue("Init/PTTOffString", PTTOffString);
settings->setValue("Init/PTTOnString", PTTOnString);
settings->setValue("Init/pttGPIOPin", pttGPIOPin);
settings->setValue("Init/pttGPIOPinR", pttGPIOPinR);
settings->setValue("Init/CM108Addr", CM108Addr);
settings->setValue("Init/HamLibPort", HamLibPort);
settings->setValue("Init/HamLibHost", HamLibHost);
settings->setValue("Init/MinimizetoTray", MintoTray);
settings->setValue("Init/multiCore", multiCore);
// Don't save freq on close as it could be offset by multiple decoders
settings->setValue("Modem/NRRcvrPairs1", RCVR[0]);
settings->setValue("Modem/NRRcvrPairs2", RCVR[1]);
settings->setValue("Modem/NRRcvrPairs3", RCVR[2]);
settings->setValue("Modem/NRRcvrPairs4", RCVR[3]);
settings->setValue("Modem/RcvrShift1", rcvr_offset[0]);
settings->setValue("Modem/RcvrShift2", rcvr_offset[1]);
settings->setValue("Modem/RcvrShift3", rcvr_offset[2]);
settings->setValue("Modem/RcvrShift4", rcvr_offset[3]);
settings->setValue("Modem/ModemType1", speed[0]);
settings->setValue("Modem/ModemType2", speed[1]);
settings->setValue("Modem/ModemType3", speed[2]);
settings->setValue("Modem/ModemType4", speed[3]);
settings->setValue("Modem/soundChannel1", soundChannel[0]);
settings->setValue("Modem/soundChannel2", soundChannel[1]);
settings->setValue("Modem/soundChannel3", soundChannel[2]);
settings->setValue("Modem/soundChannel4", soundChannel[3]);
settings->setValue("Modem/DCDThreshold", dcd_threshold);
settings->setValue("Modem/rxOffset", rxOffset);
settings->setValue("AGWHost/Server", AGWServ);
settings->setValue("AGWHost/Port", AGWPort);
settings->setValue("KISS/Server", KISSServ);
settings->setValue("KISS/Port", KISSPort);
settings->setValue("Modem/PreEmphasisAll1", emph_all[0]);
settings->setValue("Modem/PreEmphasisAll2", emph_all[1]);
settings->setValue("Modem/PreEmphasisAll3", emph_all[2]);
settings->setValue("Modem/PreEmphasisAll4", emph_all[3]);
settings->setValue("Modem/PreEmphasisDB1", emph_db[0]);
settings->setValue("Modem/PreEmphasisDB2", emph_db[1]);
settings->setValue("Modem/PreEmphasisDB3", emph_db[2]);
settings->setValue("Modem/PreEmphasisDB4", emph_db[3]);
settings->setValue("Window/Waterfall1", Firstwaterfall);
settings->setValue("Window/Waterfall2", Secondwaterfall);
settings->setValue("Modem/TxDelay1", txdelay[0]);
settings->setValue("Modem/TxDelay2", txdelay[1]);
settings->setValue("Modem/TxDelay3", txdelay[2]);
settings->setValue("Modem/TxDelay4", txdelay[3]);
settings->setValue("Modem/TxTail1", txtail[0]);
settings->setValue("Modem/TxTail2", txtail[1]);
settings->setValue("Modem/TxTail3", txtail[2]);
settings->setValue("Modem/TxTail4", txtail[3]);
settings->setValue("Modem/CWIDCall", CWIDCall);
settings->setValue("Modem/CWIDInterval", CWIDInterval);
settings->setValue("Modem/CWIDLeft", CWIDLeft);
settings->setValue("Modem/CWIDRight", CWIDRight);
settings->setValue("Modem/CWIDType", CWIDType);
saveAX25Params(0);
saveAX25Params(1);
saveAX25Params(2);
saveAX25Params(3);
settings->sync();
delete(settings);
}

View file

@ -1,426 +1,426 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include <QSettings>
#include "UZ7HOStuff.h"
extern "C" void get_exclude_list(char * line, TStringList * list);
extern "C" void get_exclude_frm(char * line, TStringList * list);
extern "C" int SoundMode;
extern "C" int RX_SR;
extern "C" int TX_SR;
extern "C" int multiCore;
extern "C" word MEMRecovery[5];
extern int MintoTray;
extern "C" int UDPClientPort;
extern "C" int UDPServerPort;
extern "C" int TXPort;
extern char UDPHost[64];
extern char CWIDCall[128];
extern int CWIDInterval;
extern int CWIDLeft;
extern int CWIDRight;
extern int CWIDType;
// This makes geting settings for more channels easier
char Prefix[16] = "AX25_A";
void GetPortSettings(int Chan);
QVariant getAX25Param(const char * key, QVariant Default)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
return settings->value(fullKey, Default);
}
void getAX25Params(int chan)
{
Prefix[5] = chan + 'A';
GetPortSettings(chan);
}
void GetPortSettings(int Chan)
{
tx_hitoneraisedb[Chan] = getAX25Param("HiToneRaise", 0).toInt();
maxframe[Chan] = getAX25Param("Maxframe", 3).toInt();
fracks[Chan] = getAX25Param("Retries", 15).toInt();
frack_time[Chan] = getAX25Param("FrackTime", 5).toInt();
idletime[Chan] = getAX25Param("IdleTime", 180).toInt();
slottime[Chan] = getAX25Param("SlotTime", 100).toInt();
persist[Chan] = getAX25Param("Persist", 128).toInt();
resptime[Chan] = getAX25Param("RespTime", 1500).toInt();
TXFrmMode[Chan] = getAX25Param("TXFrmMode", 1).toInt();
max_frame_collector[Chan] = getAX25Param("FrameCollector", 6).toInt();
//exclude_callsigns[Chan]= getAX25Param("ExcludeCallsigns/");
//exclude_APRS_frm[Chan]= getAX25Param("ExcludeAPRSFrmType/");
KISS_opt[Chan] = getAX25Param("KISSOptimization", false).toInt();;
dyn_frack[Chan] = getAX25Param("DynamicFrack", false).toInt();;
recovery[Chan] = getAX25Param("BitRecovery", 0).toInt();
NonAX25[Chan] = getAX25Param("NonAX25Frm", false).toInt();;
MEMRecovery[Chan]= getAX25Param("MEMRecovery", 200).toInt();
IPOLL[Chan] = getAX25Param("IPOLL", 80).toInt();
strcpy(MyDigiCall[Chan], getAX25Param("MyDigiCall", "").toString().toUtf8());
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
}
void getSettings()
{
int snd_ch;
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->sync();
SoundMode = settings->value("Init/SoundMode", 0).toInt();
UDPClientPort = settings->value("Init/UDPClientPort", 8888).toInt();
UDPServerPort = settings->value("Init/UDPServerPort", 8884).toInt();
TXPort = settings->value("Init/TXPort", UDPServerPort).toInt();
strcpy(UDPHost, settings->value("Init/UDPHost", "192.168.1.255").toString().toUtf8());
UDPServ = settings->value("Init/UDPServer", FALSE).toBool();
RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
strcpy(CaptureDevice, settings->value("Init/SndRXDeviceName", "hw:1,0").toString().toUtf8());
strcpy(PlaybackDevice, settings->value("Init/SndTXDeviceName", "hw:1,0").toString().toUtf8());
raduga = settings->value("Init/DispMode", DISP_RGB).toInt();
strcpy(PTTPort, settings->value("Init/PTT", "").toString().toUtf8());
PTTMode = settings->value("Init/PTTMode", 19200).toInt();
PTTBAUD = settings->value("Init/PTTBAUD", 19200).toInt();
strcpy(PTTOnString, settings->value("Init/PTTOnString", "").toString().toUtf8());
strcpy(PTTOffString, settings->value("Init/PTTOffString", "").toString().toUtf8());
pttGPIOPin = settings->value("Init/pttGPIOPin", 17).toInt();
pttGPIOPinR = settings->value("Init/pttGPIOPinR", 17).toInt();
#ifdef WIN32
strcpy(CM108Addr, settings->value("Init/CM108Addr", "0xD8C:0x08").toString().toUtf8());
#else
strcpy(CM108Addr, settings->value("Init/CM108Addr", "/dev/hidraw0").toString().toUtf8());
#endif
HamLibPort = settings->value("Init/HamLibPort", 4532).toInt();
strcpy(HamLibHost, settings->value("Init/HamLibHost", "127.0.0.1").toString().toUtf8());
DualPTT = settings->value("Init/DualPTT", 1).toInt();
TX_rotate = settings->value("Init/TXRotate", 0).toInt();
multiCore = settings->value("Init/multiCore", 0).toInt();
MintoTray = settings->value("Init/MinimizetoTray", 1).toInt();
rx_freq[0] = settings->value("Modem/RXFreq1", 1700).toInt();
rx_freq[1] = settings->value("Modem/RXFreq2", 1700).toInt();
rx_freq[2] = settings->value("Modem/RXFreq3", 1700).toInt();
rx_freq[3] = settings->value("Modem/RXFreq4", 1700).toInt();
rcvr_offset[0] = settings->value("Modem/RcvrShift1", 30).toInt();
rcvr_offset[1] = settings->value("Modem/RcvrShift2", 30).toInt();
rcvr_offset[2] = settings->value("Modem/RcvrShift3", 30).toInt();
rcvr_offset[3] = settings->value("Modem/RcvrShift4", 30).toInt();
speed[0] = settings->value("Modem/ModemType1", SPEED_1200).toInt();
speed[1] = settings->value("Modem/ModemType2", SPEED_1200).toInt();
speed[2] = settings->value("Modem/ModemType3", SPEED_1200).toInt();
speed[3] = settings->value("Modem/ModemType4", SPEED_1200).toInt();
RCVR[0] = settings->value("Modem/NRRcvrPairs1", 0).toInt();;
RCVR[1] = settings->value("Modem/NRRcvrPairs2", 0).toInt();;
RCVR[2] = settings->value("Modem/NRRcvrPairs3", 0).toInt();;
RCVR[3] = settings->value("Modem/NRRcvrPairs4", 0).toInt();;
soundChannel[0] = settings->value("Modem/soundChannel1", 1).toInt();
soundChannel[1] = settings->value("Modem/soundChannel2", 0).toInt();
soundChannel[2] = settings->value("Modem/soundChannel3", 0).toInt();
soundChannel[3] = settings->value("Modem/soundChannel4", 0).toInt();
SCO = settings->value("Init/SCO", 0).toInt();
dcd_threshold = settings->value("Modem/DCDThreshold", 40).toInt();
rxOffset = settings->value("Modem/rxOffset", 0).toInt();
AGWServ = settings->value("AGWHost/Server", TRUE).toBool();
AGWPort = settings->value("AGWHost/Port", 8000).toInt();
KISSServ = settings->value("KISS/Server", FALSE).toBool();
KISSPort = settings->value("KISS/Port", 8105).toInt();
RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
emph_all[0] = settings->value("Modem/PreEmphasisAll1", FALSE).toBool();
emph_all[1] = settings->value("Modem/PreEmphasisAll2", FALSE).toBool();
emph_all[2] = settings->value("Modem/PreEmphasisAll3", FALSE).toBool();
emph_all[3] = settings->value("Modem/PreEmphasisAll4", FALSE).toBool();
emph_db[0] = settings->value("Modem/PreEmphasisDB1", 0).toInt();
emph_db[1] = settings->value("Modem/PreEmphasisDB2", 0).toInt();
emph_db[2] = settings->value("Modem/PreEmphasisDB3", 0).toInt();
emph_db[3] = settings->value("Modem/PreEmphasisDB4", 0).toInt();
Firstwaterfall = settings->value("Window/Waterfall1", TRUE).toInt();
Secondwaterfall = settings->value("Window/Waterfall2", TRUE).toInt();
txdelay[0] = settings->value("Modem/TxDelay1", 250).toInt();
txdelay[1] = settings->value("Modem/TxDelay2", 250).toInt();
txdelay[2] = settings->value("Modem/TxDelay3", 250).toInt();
txdelay[3] = settings->value("Modem/TxDelay4", 250).toInt();
strcpy(CWIDCall, settings->value("Modem/CWIDCall", "").toString().toUtf8().toUpper());
CWIDInterval = settings->value("Modem/CWIDInterval", 0).toInt();
CWIDLeft = settings->value("Modem/CWIDLeft", 0).toInt();
CWIDRight = settings->value("Modem/CWIDRight", 0).toInt();
CWIDType = settings->value("Modem/CWIDType", 1).toInt(); // on/off
getAX25Params(0);
getAX25Params(1);
getAX25Params(2);
getAX25Params(3);
// Validate and process settings
UsingLeft = 0;
UsingRight = 0;
UsingBothChannels = 0;
for (int i = 0; i < 4; i++)
{
if (soundChannel[i] == LEFT)
{
UsingLeft = 1;
modemtoSoundLR[i] = 0;
}
else if (soundChannel[i] == RIGHT)
{
UsingRight = 1;
modemtoSoundLR[i] = 1;
}
}
if (UsingLeft && UsingRight)
UsingBothChannels = 1;
for (snd_ch = 0; snd_ch < 4; snd_ch++)
{
tx_hitoneraise[snd_ch] = powf(10.0f, -abs(tx_hitoneraisedb[snd_ch]) / 20.0f);
if (IPOLL[snd_ch] < 0)
IPOLL[snd_ch] = 0;
else if (IPOLL[snd_ch] > 65535)
IPOLL[snd_ch] = 65535;
if (MEMRecovery[snd_ch] < 1)
MEMRecovery[snd_ch] = 1;
// if (MEMRecovery[snd_ch]> 65535)
// MEMRecovery[snd_ch]= 65535;
/*
if resptime[snd_ch] < 0 then resptime[snd_ch]= 0;
if resptime[snd_ch] > 65535 then resptime[snd_ch]= 65535;
if persist[snd_ch] > 255 then persist[snd_ch]= 255;
if persist[snd_ch] < 32 then persist[snd_ch]= 32;
if fracks[snd_ch] < 1 then fracks[snd_ch]= 1;
if frack_time[snd_ch] < 1 then frack_time[snd_ch]= 1;
if idletime[snd_ch] < frack_time[snd_ch] then idletime[snd_ch]= 180;
*/
if (emph_db[snd_ch] < 0 || emph_db[snd_ch] > nr_emph)
emph_db[snd_ch] = 0;
if (max_frame_collector[snd_ch] > 6) max_frame_collector[snd_ch] = 6;
if (maxframe[snd_ch] == 0 || maxframe[snd_ch] > 7) maxframe[snd_ch] = 3;
if (qpsk_set[snd_ch].mode > 1) qpsk_set[snd_ch].mode = 0;
}
delete(settings);
}
void SavePortSettings(int Chan);
void saveAX25Param(const char * key, QVariant Value)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
settings->setValue(fullKey, Value);
}
void saveAX25Params(int chan)
{
Prefix[5] = chan + 'A';
SavePortSettings(chan);
}
void SavePortSettings(int Chan)
{
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("HiToneRaise", tx_hitoneraisedb[Chan]);
saveAX25Param("Maxframe",maxframe[Chan]);
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("FrackTime", frack_time[Chan]);
saveAX25Param("IdleTime", idletime[Chan]);
saveAX25Param("SlotTime", slottime[Chan]);
saveAX25Param("Persist", persist[Chan]);
saveAX25Param("RespTime", resptime[Chan]);
saveAX25Param("TXFrmMode", TXFrmMode[Chan]);
saveAX25Param("FrameCollector", max_frame_collector[Chan]);
saveAX25Param("ExcludeCallsigns", exclude_callsigns[Chan]);
saveAX25Param("ExcludeAPRSFrmType", exclude_APRS_frm[Chan]);
saveAX25Param("KISSOptimization", KISS_opt[Chan]);
saveAX25Param("DynamicFrack", dyn_frack[Chan]);
saveAX25Param("BitRecovery", recovery[Chan]);
saveAX25Param("NonAX25Frm", NonAX25[Chan]);
getAX25Param("MEMRecovery", MEMRecovery[Chan]);
saveAX25Param("IPOLL", IPOLL[Chan]);
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
saveAX25Param("FX25", fx25_mode[Chan]);
}
void saveSettings()
{
QSettings * settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->setValue("Init/SoundMode", SoundMode);
settings->setValue("Init/UDPClientPort", UDPClientPort);
settings->setValue("Init/UDPServerPort", UDPServerPort);
settings->setValue("Init/TXPort", TXPort);
settings->setValue("Init/UDPServer", UDPServ);
settings->setValue("Init/UDPHost", UDPHost);
settings->setValue("Init/TXSampleRate", TX_SR);
settings->setValue("Init/RXSampleRate", RX_SR);
settings->setValue("Init/SndRXDeviceName", CaptureDevice);
settings->setValue("Init/SndTXDeviceName", PlaybackDevice);
settings->setValue("Init/SCO", SCO);
settings->setValue("Init/DualPTT", DualPTT);
settings->setValue("Init/TXRotate", TX_rotate);
settings->setValue("Init/DispMode", raduga);
settings->setValue("Init/PTT", PTTPort);
settings->setValue("Init/PTTBAUD", PTTBAUD);
settings->setValue("Init/PTTMode", PTTMode);
settings->setValue("Init/PTTOffString", PTTOffString);
settings->setValue("Init/PTTOnString", PTTOnString);
settings->setValue("Init/pttGPIOPin", pttGPIOPin);
settings->setValue("Init/pttGPIOPinR", pttGPIOPinR);
settings->setValue("Init/CM108Addr", CM108Addr);
settings->setValue("Init/HamLibPort", HamLibPort);
settings->setValue("Init/HamLibHost", HamLibHost);
settings->setValue("Init/MinimizetoTray", MintoTray);
settings->setValue("Init/multiCore", multiCore);
// Don't save freq on close as it could be offset by multiple decoders
settings->setValue("Modem/NRRcvrPairs1", RCVR[0]);
settings->setValue("Modem/NRRcvrPairs2", RCVR[1]);
settings->setValue("Modem/NRRcvrPairs3", RCVR[2]);
settings->setValue("Modem/NRRcvrPairs4", RCVR[3]);
settings->setValue("Modem/RcvrShift1", rcvr_offset[0]);
settings->setValue("Modem/RcvrShift2", rcvr_offset[1]);
settings->setValue("Modem/RcvrShift3", rcvr_offset[2]);
settings->setValue("Modem/RcvrShift4", rcvr_offset[3]);
settings->setValue("Modem/ModemType1", speed[0]);
settings->setValue("Modem/ModemType2", speed[1]);
settings->setValue("Modem/ModemType3", speed[2]);
settings->setValue("Modem/ModemType4", speed[3]);
settings->setValue("Modem/soundChannel1", soundChannel[0]);
settings->setValue("Modem/soundChannel2", soundChannel[1]);
settings->setValue("Modem/soundChannel3", soundChannel[2]);
settings->setValue("Modem/soundChannel4", soundChannel[3]);
settings->setValue("Modem/DCDThreshold", dcd_threshold);
settings->setValue("Modem/rxOffset", rxOffset);
settings->setValue("AGWHost/Server", AGWServ);
settings->setValue("AGWHost/Port", AGWPort);
settings->setValue("KISS/Server", KISSServ);
settings->setValue("KISS/Port", KISSPort);
settings->setValue("Modem/PreEmphasisAll1", emph_all[0]);
settings->setValue("Modem/PreEmphasisAll2", emph_all[1]);
settings->setValue("Modem/PreEmphasisAll3", emph_all[2]);
settings->setValue("Modem/PreEmphasisAll4", emph_all[3]);
settings->setValue("Modem/PreEmphasisDB1", emph_db[0]);
settings->setValue("Modem/PreEmphasisDB2", emph_db[1]);
settings->setValue("Modem/PreEmphasisDB3", emph_db[2]);
settings->setValue("Modem/PreEmphasisDB4", emph_db[3]);
settings->setValue("Window/Waterfall1", Firstwaterfall);
settings->setValue("Window/Waterfall2", Secondwaterfall);
settings->setValue("Modem/TxDelay1", txdelay[0]);
settings->setValue("Modem/TxDelay2", txdelay[1]);
settings->setValue("Modem/TxDelay3", txdelay[2]);
settings->setValue("Modem/TxDelay4", txdelay[3]);
settings->setValue("Modem/TxTail1", txtail[0]);
settings->setValue("Modem/TxTail2", txtail[1]);
settings->setValue("Modem/TxTail3", txtail[2]);
settings->setValue("Modem/TxTail4", txtail[3]);
settings->setValue("Modem/CWIDCall", CWIDCall);
settings->setValue("Modem/CWIDInterval", CWIDInterval);
settings->setValue("Modem/CWIDLeft", CWIDLeft);
settings->setValue("Modem/CWIDRight", CWIDRight);
settings->setValue("Modem/CWIDType", CWIDType);
saveAX25Params(1);
saveAX25Params(2);
saveAX25Params(3);
settings->sync();
delete(settings);
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include <QSettings>
#include "UZ7HOStuff.h"
extern "C" void get_exclude_list(char * line, TStringList * list);
extern "C" void get_exclude_frm(char * line, TStringList * list);
extern "C" int SoundMode;
extern "C" int RX_SR;
extern "C" int TX_SR;
extern "C" int multiCore;
extern "C" word MEMRecovery[5];
extern int MintoTray;
extern "C" int UDPClientPort;
extern "C" int UDPServerPort;
extern "C" int TXPort;
extern char UDPHost[64];
extern char CWIDCall[128];
extern int CWIDInterval;
extern int CWIDLeft;
extern int CWIDRight;
extern int CWIDType;
// This makes geting settings for more channels easier
char Prefix[16] = "AX25_A";
void GetPortSettings(int Chan);
QVariant getAX25Param(const char * key, QVariant Default)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
return settings->value(fullKey, Default);
}
void getAX25Params(int chan)
{
Prefix[5] = chan + 'A';
GetPortSettings(chan);
}
void GetPortSettings(int Chan)
{
tx_hitoneraisedb[Chan] = getAX25Param("HiToneRaise", 0).toInt();
maxframe[Chan] = getAX25Param("Maxframe", 3).toInt();
fracks[Chan] = getAX25Param("Retries", 15).toInt();
frack_time[Chan] = getAX25Param("FrackTime", 5).toInt();
idletime[Chan] = getAX25Param("IdleTime", 180).toInt();
slottime[Chan] = getAX25Param("SlotTime", 100).toInt();
persist[Chan] = getAX25Param("Persist", 128).toInt();
resptime[Chan] = getAX25Param("RespTime", 1500).toInt();
TXFrmMode[Chan] = getAX25Param("TXFrmMode", 1).toInt();
max_frame_collector[Chan] = getAX25Param("FrameCollector", 6).toInt();
//exclude_callsigns[Chan]= getAX25Param("ExcludeCallsigns/");
//exclude_APRS_frm[Chan]= getAX25Param("ExcludeAPRSFrmType/");
KISS_opt[Chan] = getAX25Param("KISSOptimization", false).toInt();;
dyn_frack[Chan] = getAX25Param("DynamicFrack", false).toInt();;
recovery[Chan] = getAX25Param("BitRecovery", 0).toInt();
NonAX25[Chan] = getAX25Param("NonAX25Frm", false).toInt();;
MEMRecovery[Chan]= getAX25Param("MEMRecovery", 200).toInt();
IPOLL[Chan] = getAX25Param("IPOLL", 80).toInt();
strcpy(MyDigiCall[Chan], getAX25Param("MyDigiCall", "").toString().toUtf8());
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
}
void getSettings()
{
int snd_ch;
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->sync();
SoundMode = settings->value("Init/SoundMode", 0).toInt();
UDPClientPort = settings->value("Init/UDPClientPort", 8888).toInt();
UDPServerPort = settings->value("Init/UDPServerPort", 8884).toInt();
TXPort = settings->value("Init/TXPort", UDPServerPort).toInt();
strcpy(UDPHost, settings->value("Init/UDPHost", "192.168.1.255").toString().toUtf8());
UDPServ = settings->value("Init/UDPServer", FALSE).toBool();
RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
strcpy(CaptureDevice, settings->value("Init/SndRXDeviceName", "hw:1,0").toString().toUtf8());
strcpy(PlaybackDevice, settings->value("Init/SndTXDeviceName", "hw:1,0").toString().toUtf8());
raduga = settings->value("Init/DispMode", DISP_RGB).toInt();
strcpy(PTTPort, settings->value("Init/PTT", "").toString().toUtf8());
PTTMode = settings->value("Init/PTTMode", 19200).toInt();
PTTBAUD = settings->value("Init/PTTBAUD", 19200).toInt();
strcpy(PTTOnString, settings->value("Init/PTTOnString", "").toString().toUtf8());
strcpy(PTTOffString, settings->value("Init/PTTOffString", "").toString().toUtf8());
pttGPIOPin = settings->value("Init/pttGPIOPin", 17).toInt();
pttGPIOPinR = settings->value("Init/pttGPIOPinR", 17).toInt();
#ifdef WIN32
strcpy(CM108Addr, settings->value("Init/CM108Addr", "0xD8C:0x08").toString().toUtf8());
#else
strcpy(CM108Addr, settings->value("Init/CM108Addr", "/dev/hidraw0").toString().toUtf8());
#endif
HamLibPort = settings->value("Init/HamLibPort", 4532).toInt();
strcpy(HamLibHost, settings->value("Init/HamLibHost", "127.0.0.1").toString().toUtf8());
DualPTT = settings->value("Init/DualPTT", 1).toInt();
TX_rotate = settings->value("Init/TXRotate", 0).toInt();
multiCore = settings->value("Init/multiCore", 0).toInt();
MintoTray = settings->value("Init/MinimizetoTray", 1).toInt();
rx_freq[0] = settings->value("Modem/RXFreq1", 1700).toInt();
rx_freq[1] = settings->value("Modem/RXFreq2", 1700).toInt();
rx_freq[2] = settings->value("Modem/RXFreq3", 1700).toInt();
rx_freq[3] = settings->value("Modem/RXFreq4", 1700).toInt();
rcvr_offset[0] = settings->value("Modem/RcvrShift1", 30).toInt();
rcvr_offset[1] = settings->value("Modem/RcvrShift2", 30).toInt();
rcvr_offset[2] = settings->value("Modem/RcvrShift3", 30).toInt();
rcvr_offset[3] = settings->value("Modem/RcvrShift4", 30).toInt();
speed[0] = settings->value("Modem/ModemType1", SPEED_1200).toInt();
speed[1] = settings->value("Modem/ModemType2", SPEED_1200).toInt();
speed[2] = settings->value("Modem/ModemType3", SPEED_1200).toInt();
speed[3] = settings->value("Modem/ModemType4", SPEED_1200).toInt();
RCVR[0] = settings->value("Modem/NRRcvrPairs1", 0).toInt();;
RCVR[1] = settings->value("Modem/NRRcvrPairs2", 0).toInt();;
RCVR[2] = settings->value("Modem/NRRcvrPairs3", 0).toInt();;
RCVR[3] = settings->value("Modem/NRRcvrPairs4", 0).toInt();;
soundChannel[0] = settings->value("Modem/soundChannel1", 1).toInt();
soundChannel[1] = settings->value("Modem/soundChannel2", 0).toInt();
soundChannel[2] = settings->value("Modem/soundChannel3", 0).toInt();
soundChannel[3] = settings->value("Modem/soundChannel4", 0).toInt();
SCO = settings->value("Init/SCO", 0).toInt();
dcd_threshold = settings->value("Modem/DCDThreshold", 40).toInt();
rxOffset = settings->value("Modem/rxOffset", 0).toInt();
AGWServ = settings->value("AGWHost/Server", TRUE).toBool();
AGWPort = settings->value("AGWHost/Port", 8000).toInt();
KISSServ = settings->value("KISS/Server", FALSE).toBool();
KISSPort = settings->value("KISS/Port", 8105).toInt();
RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
emph_all[0] = settings->value("Modem/PreEmphasisAll1", FALSE).toBool();
emph_all[1] = settings->value("Modem/PreEmphasisAll2", FALSE).toBool();
emph_all[2] = settings->value("Modem/PreEmphasisAll3", FALSE).toBool();
emph_all[3] = settings->value("Modem/PreEmphasisAll4", FALSE).toBool();
emph_db[0] = settings->value("Modem/PreEmphasisDB1", 0).toInt();
emph_db[1] = settings->value("Modem/PreEmphasisDB2", 0).toInt();
emph_db[2] = settings->value("Modem/PreEmphasisDB3", 0).toInt();
emph_db[3] = settings->value("Modem/PreEmphasisDB4", 0).toInt();
Firstwaterfall = settings->value("Window/Waterfall1", TRUE).toInt();
Secondwaterfall = settings->value("Window/Waterfall2", TRUE).toInt();
txdelay[0] = settings->value("Modem/TxDelay1", 250).toInt();
txdelay[1] = settings->value("Modem/TxDelay2", 250).toInt();
txdelay[2] = settings->value("Modem/TxDelay3", 250).toInt();
txdelay[3] = settings->value("Modem/TxDelay4", 250).toInt();
strcpy(CWIDCall, settings->value("Modem/CWIDCall", "").toString().toUtf8().toUpper());
CWIDInterval = settings->value("Modem/CWIDInterval", 0).toInt();
CWIDLeft = settings->value("Modem/CWIDLeft", 0).toInt();
CWIDRight = settings->value("Modem/CWIDRight", 0).toInt();
CWIDType = settings->value("Modem/CWIDType", 1).toInt(); // on/off
getAX25Params(0);
getAX25Params(1);
getAX25Params(2);
getAX25Params(3);
// Validate and process settings
UsingLeft = 0;
UsingRight = 0;
UsingBothChannels = 0;
for (int i = 0; i < 4; i++)
{
if (soundChannel[i] == LEFT)
{
UsingLeft = 1;
modemtoSoundLR[i] = 0;
}
else if (soundChannel[i] == RIGHT)
{
UsingRight = 1;
modemtoSoundLR[i] = 1;
}
}
if (UsingLeft && UsingRight)
UsingBothChannels = 1;
for (snd_ch = 0; snd_ch < 4; snd_ch++)
{
tx_hitoneraise[snd_ch] = powf(10.0f, -abs(tx_hitoneraisedb[snd_ch]) / 20.0f);
if (IPOLL[snd_ch] < 0)
IPOLL[snd_ch] = 0;
else if (IPOLL[snd_ch] > 65535)
IPOLL[snd_ch] = 65535;
if (MEMRecovery[snd_ch] < 1)
MEMRecovery[snd_ch] = 1;
// if (MEMRecovery[snd_ch]> 65535)
// MEMRecovery[snd_ch]= 65535;
/*
if resptime[snd_ch] < 0 then resptime[snd_ch]= 0;
if resptime[snd_ch] > 65535 then resptime[snd_ch]= 65535;
if persist[snd_ch] > 255 then persist[snd_ch]= 255;
if persist[snd_ch] < 32 then persist[snd_ch]= 32;
if fracks[snd_ch] < 1 then fracks[snd_ch]= 1;
if frack_time[snd_ch] < 1 then frack_time[snd_ch]= 1;
if idletime[snd_ch] < frack_time[snd_ch] then idletime[snd_ch]= 180;
*/
if (emph_db[snd_ch] < 0 || emph_db[snd_ch] > nr_emph)
emph_db[snd_ch] = 0;
if (max_frame_collector[snd_ch] > 6) max_frame_collector[snd_ch] = 6;
if (maxframe[snd_ch] == 0 || maxframe[snd_ch] > 7) maxframe[snd_ch] = 3;
if (qpsk_set[snd_ch].mode > 1) qpsk_set[snd_ch].mode = 0;
}
delete(settings);
}
void SavePortSettings(int Chan);
void saveAX25Param(const char * key, QVariant Value)
{
char fullKey[64];
sprintf(fullKey, "%s/%s", Prefix, key);
settings->setValue(fullKey, Value);
}
void saveAX25Params(int chan)
{
Prefix[5] = chan + 'A';
SavePortSettings(chan);
}
void SavePortSettings(int Chan)
{
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("HiToneRaise", tx_hitoneraisedb[Chan]);
saveAX25Param("Maxframe",maxframe[Chan]);
saveAX25Param("Retries", fracks[Chan]);
saveAX25Param("FrackTime", frack_time[Chan]);
saveAX25Param("IdleTime", idletime[Chan]);
saveAX25Param("SlotTime", slottime[Chan]);
saveAX25Param("Persist", persist[Chan]);
saveAX25Param("RespTime", resptime[Chan]);
saveAX25Param("TXFrmMode", TXFrmMode[Chan]);
saveAX25Param("FrameCollector", max_frame_collector[Chan]);
saveAX25Param("ExcludeCallsigns", exclude_callsigns[Chan]);
saveAX25Param("ExcludeAPRSFrmType", exclude_APRS_frm[Chan]);
saveAX25Param("KISSOptimization", KISS_opt[Chan]);
saveAX25Param("DynamicFrack", dyn_frack[Chan]);
saveAX25Param("BitRecovery", recovery[Chan]);
saveAX25Param("NonAX25Frm", NonAX25[Chan]);
getAX25Param("MEMRecovery", MEMRecovery[Chan]);
saveAX25Param("IPOLL", IPOLL[Chan]);
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
saveAX25Param("FX25", fx25_mode[Chan]);
}
void saveSettings()
{
QSettings * settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
settings->setValue("Init/SoundMode", SoundMode);
settings->setValue("Init/UDPClientPort", UDPClientPort);
settings->setValue("Init/UDPServerPort", UDPServerPort);
settings->setValue("Init/TXPort", TXPort);
settings->setValue("Init/UDPServer", UDPServ);
settings->setValue("Init/UDPHost", UDPHost);
settings->setValue("Init/TXSampleRate", TX_SR);
settings->setValue("Init/RXSampleRate", RX_SR);
settings->setValue("Init/SndRXDeviceName", CaptureDevice);
settings->setValue("Init/SndTXDeviceName", PlaybackDevice);
settings->setValue("Init/SCO", SCO);
settings->setValue("Init/DualPTT", DualPTT);
settings->setValue("Init/TXRotate", TX_rotate);
settings->setValue("Init/DispMode", raduga);
settings->setValue("Init/PTT", PTTPort);
settings->setValue("Init/PTTBAUD", PTTBAUD);
settings->setValue("Init/PTTMode", PTTMode);
settings->setValue("Init/PTTOffString", PTTOffString);
settings->setValue("Init/PTTOnString", PTTOnString);
settings->setValue("Init/pttGPIOPin", pttGPIOPin);
settings->setValue("Init/pttGPIOPinR", pttGPIOPinR);
settings->setValue("Init/CM108Addr", CM108Addr);
settings->setValue("Init/HamLibPort", HamLibPort);
settings->setValue("Init/HamLibHost", HamLibHost);
settings->setValue("Init/MinimizetoTray", MintoTray);
settings->setValue("Init/multiCore", multiCore);
// Don't save freq on close as it could be offset by multiple decoders
settings->setValue("Modem/NRRcvrPairs1", RCVR[0]);
settings->setValue("Modem/NRRcvrPairs2", RCVR[1]);
settings->setValue("Modem/NRRcvrPairs3", RCVR[2]);
settings->setValue("Modem/NRRcvrPairs4", RCVR[3]);
settings->setValue("Modem/RcvrShift1", rcvr_offset[0]);
settings->setValue("Modem/RcvrShift2", rcvr_offset[1]);
settings->setValue("Modem/RcvrShift3", rcvr_offset[2]);
settings->setValue("Modem/RcvrShift4", rcvr_offset[3]);
settings->setValue("Modem/ModemType1", speed[0]);
settings->setValue("Modem/ModemType2", speed[1]);
settings->setValue("Modem/ModemType3", speed[2]);
settings->setValue("Modem/ModemType4", speed[3]);
settings->setValue("Modem/soundChannel1", soundChannel[0]);
settings->setValue("Modem/soundChannel2", soundChannel[1]);
settings->setValue("Modem/soundChannel3", soundChannel[2]);
settings->setValue("Modem/soundChannel4", soundChannel[3]);
settings->setValue("Modem/DCDThreshold", dcd_threshold);
settings->setValue("Modem/rxOffset", rxOffset);
settings->setValue("AGWHost/Server", AGWServ);
settings->setValue("AGWHost/Port", AGWPort);
settings->setValue("KISS/Server", KISSServ);
settings->setValue("KISS/Port", KISSPort);
settings->setValue("Modem/PreEmphasisAll1", emph_all[0]);
settings->setValue("Modem/PreEmphasisAll2", emph_all[1]);
settings->setValue("Modem/PreEmphasisAll3", emph_all[2]);
settings->setValue("Modem/PreEmphasisAll4", emph_all[3]);
settings->setValue("Modem/PreEmphasisDB1", emph_db[0]);
settings->setValue("Modem/PreEmphasisDB2", emph_db[1]);
settings->setValue("Modem/PreEmphasisDB3", emph_db[2]);
settings->setValue("Modem/PreEmphasisDB4", emph_db[3]);
settings->setValue("Window/Waterfall1", Firstwaterfall);
settings->setValue("Window/Waterfall2", Secondwaterfall);
settings->setValue("Modem/TxDelay1", txdelay[0]);
settings->setValue("Modem/TxDelay2", txdelay[1]);
settings->setValue("Modem/TxDelay3", txdelay[2]);
settings->setValue("Modem/TxDelay4", txdelay[3]);
settings->setValue("Modem/TxTail1", txtail[0]);
settings->setValue("Modem/TxTail2", txtail[1]);
settings->setValue("Modem/TxTail3", txtail[2]);
settings->setValue("Modem/TxTail4", txtail[3]);
settings->setValue("Modem/CWIDCall", CWIDCall);
settings->setValue("Modem/CWIDInterval", CWIDInterval);
settings->setValue("Modem/CWIDLeft", CWIDLeft);
settings->setValue("Modem/CWIDRight", CWIDRight);
settings->setValue("Modem/CWIDType", CWIDType);
saveAX25Params(1);
saveAX25Params(2);
saveAX25Params(3);
settings->sync();
delete(settings);
}

View file

@ -1,100 +1,100 @@
<ui version="4.0">
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>250</y>
<width>351</width>
<height>33</height>
</rect>
</property>
<layout class="QHBoxLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint">
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>
<ui version="4.0">
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>250</y>
<width>351</width>
<height>33</height>
</rect>
</property>
<layout class="QHBoxLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint">
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>

File diff suppressed because it is too large Load diff

2132
Modulate.c

File diff suppressed because it is too large Load diff

View file

@ -1,288 +1,288 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4EDE958E-D0AC-37B4-81F7-78313A262DCD}</ProjectGuid>
<RootNamespace>QtSoundModem</RootNamespace>
<Keyword>QtVS_v304</Keyword>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>release\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>release\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>debug\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>debug\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Debug\</OutDir>
<IntDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Debug\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Release\</OutDir>
<IntDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Release\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtInstall>5.14.2_msvc2017</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtInstall>5.14.2_msvc2017</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>None</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>false</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c" />
<ClCompile Include="BusyDetect.c" />
<ClCompile Include="Config.cpp" />
<ClCompile Include="hid.c" />
<ClCompile Include="Modulate.c" />
<ClCompile Include="QtSoundModem.cpp" />
<ClCompile Include="rsid.c" />
<ClCompile Include="RSUnit.c" />
<ClCompile Include="SMMain.c" />
<ClCompile Include="ShowFilter.cpp" />
<ClCompile Include="SoundInput.c" />
<ClCompile Include="UZ7HOUtils.c" />
<ClCompile Include="ardopSampleArrays.c" />
<ClCompile Include="ax25.c" />
<ClCompile Include="ax25_agw.c" />
<ClCompile Include="ax25_demod.c" />
<ClCompile Include="ax25_fec.c" />
<ClCompile Include="ax25_l2.c" />
<ClCompile Include="ax25_mod.c" />
<ClCompile Include="berlekamp.c" />
<ClCompile Include="galois.c" />
<ClCompile Include="kiss_mode.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="ofdm.c" />
<ClCompile Include="pktARDOP.c" />
<ClCompile Include="rs.c" />
<ClCompile Include="sm_main.c" />
<ClCompile Include="tcpCode.cpp" />
<ClCompile Include="Waveout.c" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h">
</QtMoc>
<ClInclude Include="UZ7HOStuff.h" />
<QtMoc Include="tcpCode.h">
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">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&gt;NUL &gt;debug\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_predefs.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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&gt;NUL &gt;release\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_predefs.h;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<QtUic Include="ModemDialog.ui">
</QtUic>
<QtUic Include="QtSoundModem.ui">
</QtUic>
<QtUic Include="calibrateDialog.ui">
</QtUic>
<QtUic Include="devicesDialog.ui">
</QtUic>
<QtUic Include="filterWindow.ui">
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc">
</QtRcc>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="QtSoundModem.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4EDE958E-D0AC-37B4-81F7-78313A262DCD}</ProjectGuid>
<RootNamespace>QtSoundModem</RootNamespace>
<Keyword>QtVS_v304</Keyword>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>release\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>release\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>debug\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>debug\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Debug\</OutDir>
<IntDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Debug\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Release\</OutDir>
<IntDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Release\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtInstall>5.14.2_msvc2017</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtInstall>5.14.2_msvc2017</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>None</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>false</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c" />
<ClCompile Include="BusyDetect.c" />
<ClCompile Include="Config.cpp" />
<ClCompile Include="hid.c" />
<ClCompile Include="Modulate.c" />
<ClCompile Include="QtSoundModem.cpp" />
<ClCompile Include="rsid.c" />
<ClCompile Include="RSUnit.c" />
<ClCompile Include="SMMain.c" />
<ClCompile Include="ShowFilter.cpp" />
<ClCompile Include="SoundInput.c" />
<ClCompile Include="UZ7HOUtils.c" />
<ClCompile Include="ardopSampleArrays.c" />
<ClCompile Include="ax25.c" />
<ClCompile Include="ax25_agw.c" />
<ClCompile Include="ax25_demod.c" />
<ClCompile Include="ax25_fec.c" />
<ClCompile Include="ax25_l2.c" />
<ClCompile Include="ax25_mod.c" />
<ClCompile Include="berlekamp.c" />
<ClCompile Include="galois.c" />
<ClCompile Include="kiss_mode.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="ofdm.c" />
<ClCompile Include="pktARDOP.c" />
<ClCompile Include="rs.c" />
<ClCompile Include="sm_main.c" />
<ClCompile Include="tcpCode.cpp" />
<ClCompile Include="Waveout.c" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h">
</QtMoc>
<ClInclude Include="UZ7HOStuff.h" />
<QtMoc Include="tcpCode.h">
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">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&gt;NUL &gt;debug\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_predefs.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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&gt;NUL &gt;release\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_predefs.h;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<QtUic Include="ModemDialog.ui">
</QtUic>
<QtUic Include="QtSoundModem.ui">
</QtUic>
<QtUic Include="calibrateDialog.ui">
</QtUic>
<QtUic Include="devicesDialog.ui">
</QtUic>
<QtUic Include="filterWindow.ui">
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc">
</QtRcc>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="QtSoundModem.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
</Project>

File diff suppressed because it is too large Load diff

View file

@ -1,106 +1,106 @@
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_QtSoundModem.h"
#include "ui_calibrateDialog.h"
#include "ui_devicesDialog.h"
#include "ui_filterWindow.h"
#include "ui_ModemDialog.h"
#include "QThread"
#include <QLabel>
#include <QTableWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QUdpSocket>
#include <QSystemTrayIcon>
#include "tcpCode.h"
class QtSoundModem : public QMainWindow
{
Q_OBJECT
public:
QtSoundModem(QWidget *parent = Q_NULLPTR);
void changeEvent(QEvent * e);
void closeEvent(QCloseEvent * event);
~QtSoundModem();
void RefreshWaterfall(int snd_ch, unsigned char * Data);
void initWaterfall(int chan, int state);
void show_grid();
private slots:
void doDevices();
void MinimizetoTray();
void TrayActivated(QSystemTrayIcon::ActivationReason reason);
void CWIDTimer();
void MyTimerSlot();
void returnPressed();
void clickedSlotI(int i);
void doModems();
void doFilter(int Chan, int Filter);
void SoundModeChanged(bool State);
void DualPTTChanged(bool State);
void CATChanged(bool State);
void PTTPortChanged(int);
void deviceaccept();
void devicereject();
void modemaccept();
void modemSave();
void modemreject();
void doRSIDA();
void doRSIDB();
void doRSIDC();
void doRSIDD();
void handleButton(int Port, int Act);
void doCalibrate();
void doAbout();
void doRestartWF();
void doupdateDCD(int, int);
void sendtoTrace(char * Msg, int tx);
void preEmphAllAChanged(int);
void preEmphAllBChanged(int);
void preEmphAllCChanged(int state);
void preEmphAllDChanged(int state);
void menuChecked();
void onTEselectionChanged();
void clickedSlot();
protected:
bool eventFilter(QObject * obj, QEvent * evt);
void resizeEvent(QResizeEvent *event) override;
private:
Ui::QtSoundModemClass ui;
QTableWidget* sessionTable;
QStringList m_TableHeader;
QMenu *setupMenu;
QMenu *viewMenu;
QAction *actDevices;
QAction *actModems;
QAction *actMintoTray;
QAction *actCalib;
QAction *actAbout;
QAction *actRestartWF;
QAction *actWaterfall1;
QAction *actWaterfall2;
void RefreshSpectrum(unsigned char * Data);
};
class myResize : public QObject
{
Q_OBJECT
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
};
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_QtSoundModem.h"
#include "ui_calibrateDialog.h"
#include "ui_devicesDialog.h"
#include "ui_filterWindow.h"
#include "ui_ModemDialog.h"
#include "QThread"
#include <QLabel>
#include <QTableWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QUdpSocket>
#include <QSystemTrayIcon>
#include "tcpCode.h"
class QtSoundModem : public QMainWindow
{
Q_OBJECT
public:
QtSoundModem(QWidget *parent = Q_NULLPTR);
void changeEvent(QEvent * e);
void closeEvent(QCloseEvent * event);
~QtSoundModem();
void RefreshWaterfall(int snd_ch, unsigned char * Data);
void initWaterfall(int chan, int state);
void show_grid();
private slots:
void doDevices();
void MinimizetoTray();
void TrayActivated(QSystemTrayIcon::ActivationReason reason);
void CWIDTimer();
void MyTimerSlot();
void returnPressed();
void clickedSlotI(int i);
void doModems();
void doFilter(int Chan, int Filter);
void SoundModeChanged(bool State);
void DualPTTChanged(bool State);
void CATChanged(bool State);
void PTTPortChanged(int);
void deviceaccept();
void devicereject();
void modemaccept();
void modemSave();
void modemreject();
void doRSIDA();
void doRSIDB();
void doRSIDC();
void doRSIDD();
void handleButton(int Port, int Act);
void doCalibrate();
void doAbout();
void doRestartWF();
void doupdateDCD(int, int);
void sendtoTrace(char * Msg, int tx);
void preEmphAllAChanged(int);
void preEmphAllBChanged(int);
void preEmphAllCChanged(int state);
void preEmphAllDChanged(int state);
void menuChecked();
void onTEselectionChanged();
void clickedSlot();
protected:
bool eventFilter(QObject * obj, QEvent * evt);
void resizeEvent(QResizeEvent *event) override;
private:
Ui::QtSoundModemClass ui;
QTableWidget* sessionTable;
QStringList m_TableHeader;
QMenu *setupMenu;
QMenu *viewMenu;
QAction *actDevices;
QAction *actModems;
QAction *actMintoTray;
QAction *actCalib;
QAction *actAbout;
QAction *actRestartWF;
QAction *actWaterfall1;
QAction *actWaterfall2;
void RefreshSpectrum(unsigned char * Data);
};
class myResize : public QObject
{
Q_OBJECT
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
};

View file

@ -1,195 +1,195 @@
[General]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\xb5\0\0\0\xa1\0\0\x4\xb2\0\0\x3v\0\0\0\xb6\0\0\0\xc0\0\0\x4\xb1\0\0\x3u\0\0\0\0\0\0\0\0\x5\0\0\0\0\xb6\0\0\0\xc0\0\0\x4\xb1\0\0\x3u)
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\xfc\0\0\x2\xa1\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
[Init]
TXSampleRate=12000
RXSampleRate=12000
SndRXDeviceName="CABLE-A OUTPUT (VB-AUDIO CABLE "
SndTXDeviceName=CABLE INPUT (VB-AUDIO VIRTUAL C
DualChan=2
SCO=0
DualPTT=1
PTT=HAMLIB
TXRotate=1
DispMode=1
SoundMode=0
UDPClientPort=8888
UDPServerPort=8884
UDPServer=0
PTTBAUD=19200
PTTMode=17
PTTOffString=
PTTOnString=127.0.0.1
pttGPIOPin=17
pttGPIOPinR=17
CM108Addr=0xD8C:0x08
HamLibPort=4532
HamLibHost=127.0.0.1
MinimizetoTray=0
multiCore=0
UDPHost=127.0.0.1
TXPort=8888
[Modem]
RXFreq1=1100
RXFreq2=2000
ModemType1=0
ModemType2=0
DCDThreshold=36
NRRcvrPairs1=2
NRRcvrPairs2=2
RcvrShift1=30
RcvrShift2=30
soundChannel1=1
soundChannel2=1
RawPktMinLen=17
SwapPTTPins=0
PreEmphasisDB1=0
PreEmphasisDB2=0
PreEmphasisAll1=1
PreEmphasisAll2=0
Default1=1
Default2=1
HoldPnt=0
AFC=32
TxDelay1=250
TxDelay2=250
TxTail1=50
TxTail2=50
Diddles=0
InvPTTPins=0
RXFreq3=2000
NRRcvrPairs3=2
NRRcvrPairs4=0
RcvrShift3=30
RcvrShift4=30
ModemType3=0
ModemType4=0
soundChannel3=0
soundChannel4=0
PreEmphasisAll3=1
PreEmphasisAll4=0
PreEmphasisDB3=0
PreEmphasisDB4=0
TxDelay3=250
TxDelay4=250
TxTail3=50
TxTail4=50
RXFreq4=2700
CWIDCall=
CWIDInterval=0
CWIDLeft=0
CWIDRight=0
CWIDType=1
[AGWHost]
Server=1
Port=8009
[KISS]
Server=0
Port=8100
[AX25_A]
Maxframe=2
Retries=8
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=2000
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=1
DynamicFrack=0
BitRecovery=0
NonAX25Frm=1
MEMRecovery=200
IPOLL=80
MyDigiCall=
HiToneRaise=0
soundChannel=1
FX25=2
[AX25_B]
Maxframe=2
Retries=5
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=2000
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=1
DynamicFrack=0
BitRecovery=0
NonAX25Frm=1
MEMRecovery=200
IPOLL=80
MyDigiCall=
HiToneRaise=0
soundChannel=0
FX25=2
[Window]
Top=281
Left=73
Height=735
Width=810
Waterfall1=1
Waterfall2=1
StatTable=1
Monitor=1
MinimizedOnStartup=0
[Font]
Size=8
Name=MS Sans Serif
[AX25_C]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
IPOLL=80
MyDigiCall=
FX25=1
[AX25_D]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
IPOLL=80
MyDigiCall=
FX25=1
[General]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\xb5\0\0\0\xa1\0\0\x4\xb2\0\0\x3v\0\0\0\xb6\0\0\0\xc0\0\0\x4\xb1\0\0\x3u\0\0\0\0\0\0\0\0\x5\0\0\0\0\xb6\0\0\0\xc0\0\0\x4\xb1\0\0\x3u)
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\xfc\0\0\x2\xa1\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
[Init]
TXSampleRate=12000
RXSampleRate=12000
SndRXDeviceName="CABLE-A OUTPUT (VB-AUDIO CABLE "
SndTXDeviceName=CABLE INPUT (VB-AUDIO VIRTUAL C
DualChan=2
SCO=0
DualPTT=1
PTT=HAMLIB
TXRotate=1
DispMode=1
SoundMode=0
UDPClientPort=8888
UDPServerPort=8884
UDPServer=0
PTTBAUD=19200
PTTMode=17
PTTOffString=
PTTOnString=127.0.0.1
pttGPIOPin=17
pttGPIOPinR=17
CM108Addr=0xD8C:0x08
HamLibPort=4532
HamLibHost=127.0.0.1
MinimizetoTray=0
multiCore=0
UDPHost=127.0.0.1
TXPort=8888
[Modem]
RXFreq1=1100
RXFreq2=2000
ModemType1=0
ModemType2=0
DCDThreshold=36
NRRcvrPairs1=2
NRRcvrPairs2=2
RcvrShift1=30
RcvrShift2=30
soundChannel1=1
soundChannel2=1
RawPktMinLen=17
SwapPTTPins=0
PreEmphasisDB1=0
PreEmphasisDB2=0
PreEmphasisAll1=1
PreEmphasisAll2=0
Default1=1
Default2=1
HoldPnt=0
AFC=32
TxDelay1=250
TxDelay2=250
TxTail1=50
TxTail2=50
Diddles=0
InvPTTPins=0
RXFreq3=2000
NRRcvrPairs3=2
NRRcvrPairs4=0
RcvrShift3=30
RcvrShift4=30
ModemType3=0
ModemType4=0
soundChannel3=0
soundChannel4=0
PreEmphasisAll3=1
PreEmphasisAll4=0
PreEmphasisDB3=0
PreEmphasisDB4=0
TxDelay3=250
TxDelay4=250
TxTail3=50
TxTail4=50
RXFreq4=2700
CWIDCall=
CWIDInterval=0
CWIDLeft=0
CWIDRight=0
CWIDType=1
[AGWHost]
Server=1
Port=8009
[KISS]
Server=0
Port=8100
[AX25_A]
Maxframe=2
Retries=8
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=2000
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=1
DynamicFrack=0
BitRecovery=0
NonAX25Frm=1
MEMRecovery=200
IPOLL=80
MyDigiCall=
HiToneRaise=0
soundChannel=1
FX25=2
[AX25_B]
Maxframe=2
Retries=5
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=2000
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=1
DynamicFrack=0
BitRecovery=0
NonAX25Frm=1
MEMRecovery=200
IPOLL=80
MyDigiCall=
HiToneRaise=0
soundChannel=0
FX25=2
[Window]
Top=281
Left=73
Height=735
Width=810
Waterfall1=1
Waterfall2=1
StatTable=1
Monitor=1
MinimizedOnStartup=0
[Font]
Size=8
Name=MS Sans Serif
[AX25_C]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
IPOLL=80
MyDigiCall=
FX25=1
[AX25_D]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
IPOLL=80
MyDigiCall=
FX25=1

View file

@ -1,36 +1,36 @@
# ----------------------------------------------------
# This file is generated by the Qt Visual Studio Tools.
# ------------------------------------------------------
# This is a reminder that you are using a generated .pro file.
# Remove it when you are finished editing this file.
message("You are running qmake on a generated .pro file. This may not work!")
HEADERS += ./UZ7HOStuff.h \
./QtSoundModem.h \
./tcpCode.h
SOURCES += ./ax25.c \
./ax25_agw.c \
./ax25_demod.c \
./ax25_l2.c \
./ax25_mod.c \
./berlekamp.c \
./Config.cpp \
./galois.c \
./kiss_mode.c \
./main.cpp \
./QtSoundModem.cpp \
./rs.c \
./ShowFilter.cpp \
./SMMain.c \
./sm_main.c \
./UZ7HOUtils.c \
./Waveout.c \
./tcpCode.cpp
FORMS += ./calibrateDialog.ui \
./devicesDialog.ui \
./filterWindow.ui \
./ModemDialog.ui \
./QtSoundModem.ui
RESOURCES += QtSoundModem.qrc
# ----------------------------------------------------
# This file is generated by the Qt Visual Studio Tools.
# ------------------------------------------------------
# This is a reminder that you are using a generated .pro file.
# Remove it when you are finished editing this file.
message("You are running qmake on a generated .pro file. This may not work!")
HEADERS += ./UZ7HOStuff.h \
./QtSoundModem.h \
./tcpCode.h
SOURCES += ./ax25.c \
./ax25_agw.c \
./ax25_demod.c \
./ax25_l2.c \
./ax25_mod.c \
./berlekamp.c \
./Config.cpp \
./galois.c \
./kiss_mode.c \
./main.cpp \
./QtSoundModem.cpp \
./rs.c \
./ShowFilter.cpp \
./SMMain.c \
./sm_main.c \
./UZ7HOUtils.c \
./Waveout.c \
./tcpCode.cpp
FORMS += ./calibrateDialog.ui \
./devicesDialog.ui \
./filterWindow.ui \
./ModemDialog.ui \
./QtSoundModem.ui
RESOURCES += QtSoundModem.qrc

File diff suppressed because it is too large Load diff

View file

@ -1,291 +1,291 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4EDE958E-D0AC-37B4-81F7-78313A262DCD}</ProjectGuid>
<RootNamespace>QtSoundModem</RootNamespace>
<Keyword>QtVS_v304</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>release\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>release\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>debug\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>debug\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtInstall>5.14.2</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtInstall>5.14.2</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>None</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>false</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c" />
<ClCompile Include="BusyDetect.c" />
<ClCompile Include="Config.cpp" />
<ClCompile Include="hid.c" />
<ClCompile Include="il2p.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="Modulate.c" />
<ClCompile Include="QtSoundModem.cpp" />
<ClCompile Include="rsid.c" />
<ClCompile Include="RSUnit.c" />
<ClCompile Include="SMMain.c" />
<ClCompile Include="ShowFilter.cpp" />
<ClCompile Include="SoundInput.c" />
<ClCompile Include="UZ7HOUtils.c" />
<ClCompile Include="ardopSampleArrays.c" />
<ClCompile Include="ax25.c" />
<ClCompile Include="ax25_agw.c" />
<ClCompile Include="ax25_demod.c" />
<ClCompile Include="ax25_fec.c" />
<ClCompile Include="ax25_l2.c" />
<ClCompile Include="ax25_mod.c" />
<ClCompile Include="berlekamp.c" />
<ClCompile Include="galois.c" />
<ClCompile Include="kiss_mode.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="ofdm.c" />
<ClCompile Include="pktARDOP.c" />
<ClCompile Include="rs.c" />
<ClCompile Include="sm_main.c" />
<ClCompile Include="tcpCode.cpp" />
<ClCompile Include="Waveout.c" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h">
</QtMoc>
<ClInclude Include="UZ7HOStuff.h" />
<QtMoc Include="tcpCode.h">
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">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&gt;NUL &gt;debug\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_predefs.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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&gt;NUL &gt;release\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_predefs.h;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<QtUic Include="ModemDialog.ui">
</QtUic>
<QtUic Include="QtSoundModem.ui">
</QtUic>
<QtUic Include="calibrateDialog.ui">
</QtUic>
<QtUic Include="devicesDialog.ui">
</QtUic>
<QtUic Include="filterWindow.ui">
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc">
</QtRcc>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="QtSoundModem.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4EDE958E-D0AC-37B4-81F7-78313A262DCD}</ProjectGuid>
<RootNamespace>QtSoundModem</RootNamespace>
<Keyword>QtVS_v304</Keyword>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>release\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>release\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PlatformToolset>v141</PlatformToolset>
<OutputDirectory>debug\</OutputDirectory>
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
<CharacterSet>NotSet</CharacterSet>
<ConfigurationType>Application</ConfigurationType>
<IntermediateDirectory>debug\</IntermediateDirectory>
<PrimaryOutput>QtSoundModem</PrimaryOutput>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\\</IntDir>
<TargetName>QtSoundModem</TargetName>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtInstall>5.14.2</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtInstall>5.14.2</QtInstall>
<QtModules>core;network;gui;widgets;serialport</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>None</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>false</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
</ClCompile>
<Link>
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Midl>
<DefaultCharType>Unsigned</DefaultCharType>
<EnableErrorChecks>None</EnableErrorChecks>
<WarningLevel>0</WarningLevel>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_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)</PreprocessorDefinitions>
</ResourceCompile>
<QtMoc>
<CompilerFlavor>msvc</CompilerFlavor>
<Include>./$(Configuration)/moc_predefs.h</Include>
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
<DynamicSource>output</DynamicSource>
<QtMocDir>$(IntDir)</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
</QtMoc>
<QtRcc>
<InitFuncName>QtSoundModem</InitFuncName>
<Compression>default</Compression>
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
<QtRccDir>$(IntDir)</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
</QtRcc>
<QtUic>
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
<QtUicDir>$(IntDir)</QtUicDir>
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
</QtUic>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c" />
<ClCompile Include="BusyDetect.c" />
<ClCompile Include="Config.cpp" />
<ClCompile Include="hid.c" />
<ClCompile Include="il2p.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="Modulate.c" />
<ClCompile Include="QtSoundModem.cpp" />
<ClCompile Include="rsid.c" />
<ClCompile Include="RSUnit.c" />
<ClCompile Include="SMMain.c" />
<ClCompile Include="ShowFilter.cpp" />
<ClCompile Include="SoundInput.c" />
<ClCompile Include="UZ7HOUtils.c" />
<ClCompile Include="ardopSampleArrays.c" />
<ClCompile Include="ax25.c" />
<ClCompile Include="ax25_agw.c" />
<ClCompile Include="ax25_demod.c" />
<ClCompile Include="ax25_fec.c" />
<ClCompile Include="ax25_l2.c" />
<ClCompile Include="ax25_mod.c" />
<ClCompile Include="berlekamp.c" />
<ClCompile Include="galois.c" />
<ClCompile Include="kiss_mode.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="ofdm.c" />
<ClCompile Include="pktARDOP.c" />
<ClCompile Include="rs.c" />
<ClCompile Include="sm_main.c" />
<ClCompile Include="tcpCode.cpp" />
<ClCompile Include="Waveout.c" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h">
</QtMoc>
<ClInclude Include="UZ7HOStuff.h" />
<QtMoc Include="tcpCode.h">
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">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&gt;NUL &gt;debug\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_predefs.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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&gt;NUL &gt;release\moc_predefs.h</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generate moc_predefs.h</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_predefs.h;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<QtUic Include="ModemDialog.ui">
</QtUic>
<QtUic Include="QtSoundModem.ui">
</QtUic>
<QtUic Include="calibrateDialog.ui">
</QtUic>
<QtUic Include="devicesDialog.ui">
</QtUic>
<QtUic Include="filterWindow.ui">
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc">
</QtRcc>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="QtSoundModem.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
</Project>

View file

@ -1,34 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>C:\Devprogs\bpq32\SMSat2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>&lt; d:\samples.wav</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2022-12-30T15:55:55.0433562Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:31.5906689Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2022-12-30T15:55:55.2283725Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:33.3845083Z</QtLastBackgroundBuild>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>C:\Devprogs\bpq32\SMSat2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>&lt; d:\samples.wav</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2022-12-30T15:55:55.0433562Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:31.5906689Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2022-12-30T15:55:55.2283725Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:33.3845083Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View file

@ -1,190 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BusyDetect.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Modulate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="QtSoundModem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RSUnit.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SMMain.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ShowFilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SoundInput.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UZ7HOUtils.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ardopSampleArrays.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_agw.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_demod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_fec.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_l2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_mod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="berlekamp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="galois.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="kiss_mode.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ofdm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pktARDOP.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tcpCode.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Waveout.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hid.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rsid.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="il2p.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h">
<Filter>Header Files</Filter>
</QtMoc>
<ClInclude Include="UZ7HOStuff.h">
<Filter>Header Files</Filter>
</ClInclude>
<QtMoc Include="tcpCode.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<Filter>Generated Files</Filter>
</CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt">
<Filter>Generated Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<QtUic Include="ModemDialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="QtSoundModem.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="calibrateDialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="devicesDialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="filterWindow.ui">
<Filter>Form Files</Filter>
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc">
<Filter>Resource Files</Filter>
</QtRcc>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="QtSoundModem.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BusyDetect.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Modulate.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="QtSoundModem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RSUnit.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SMMain.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ShowFilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SoundInput.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UZ7HOUtils.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ardopSampleArrays.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_agw.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_demod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_fec.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_l2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ax25_mod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="berlekamp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="galois.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="kiss_mode.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ofdm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pktARDOP.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tcpCode.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Waveout.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hid.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rsid.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="il2p.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h">
<Filter>Header Files</Filter>
</QtMoc>
<ClInclude Include="UZ7HOStuff.h">
<Filter>Header Files</Filter>
</ClInclude>
<QtMoc Include="tcpCode.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<Filter>Generated Files</Filter>
</CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt">
<Filter>Generated Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<QtUic Include="ModemDialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="QtSoundModem.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="calibrateDialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="devicesDialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="filterWindow.ui">
<Filter>Form Files</Filter>
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc">
<Filter>Resource Files</Filter>
</QtRcc>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="QtSoundModem.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

View file

@ -1,34 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SM2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>&lt; d:\samples.wav</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>.\debug</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2023-04-25T14:18:34.8597729Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:31.5906689Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2023-04-25T14:18:38.8848952Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:33.3845083Z</QtLastBackgroundBuild>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SM2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>&lt; d:\samples.wav</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>.\debug</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2023-04-25T14:18:34.8597729Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:31.5906689Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2023-04-25T14:18:38.8848952Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2022-03-11T19:38:33.3845083Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View file

@ -1,175 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B12702AD-ABFB-343A-A199-8E24837244A3}</ProjectGuid>
<Keyword>QtVS_v301</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">
<QtMsBuild>$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Copy\</OutDir>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\Copy\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Copy\</OutDir>
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\Copy\</IntDir>
</PropertyGroup>
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtInstall>msvc2017</QtInstall>
<QtModules>core;gui;network;widgets</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtInstall>msvc2017</QtInstall>
<QtModules>core;gui;network;widgets</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalDependencies>libfftw3f-3.lib;setupapi.lib;WS2_32.Lib;$(QtDir)\lib\Qt5SerialPort.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalDependencies>libfftw3f-3.lib;setupapi.lib;WS2_32.Lib;$(QtDir)\lib\Qt5SerialPort.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c" />
<ClCompile Include="ardopSampleArrays.c" />
<ClCompile Include="ax25.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="ax25_agw.c" />
<ClCompile Include="ax25_demod.c" />
<ClCompile Include="ax25_fec.c" />
<ClCompile Include="ax25_l2.c" />
<ClCompile Include="ax25_mod.c" />
<ClCompile Include="berlekamp.c" />
<ClCompile Include="BusyDetect.c" />
<ClCompile Include="Config.cpp">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Default</CompileAs>
</ClCompile>
<ClCompile Include="galois.c" />
<ClCompile Include="hid.c" />
<ClCompile Include="kiss_mode.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="Modulate.c" />
<ClCompile Include="ofdm.c" />
<ClCompile Include="pktARDOP.c" />
<ClCompile Include="QtSoundModem.cpp">
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">input</DynamicSource>
<QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).moc</QtMocFileName>
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">input</DynamicSource>
<QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).moc</QtMocFileName>
</ClCompile>
<ClCompile Include="rs.c" />
<ClCompile Include="RSUnit.c" />
<ClCompile Include="ShowFilter.cpp" />
<ClCompile Include="SMMain.c" />
<ClCompile Include="sm_main.c" />
<ClCompile Include="SoundInput.c" />
<ClCompile Include="tcpCode.cpp" />
<ClCompile Include="UZ7HOUtils.c" />
<ClCompile Include="Waveout.c" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h" />
</ItemGroup>
<ItemGroup>
<QtUic Include="calibrateDialog.ui" />
<QtUic Include="devicesDialog.ui">
<SubType>Designer</SubType>
</QtUic>
<QtUic Include="filterWindow.ui" />
<QtUic Include="ModemDialog.ui">
<SubType>Designer</SubType>
</QtUic>
<QtUic Include="QtSoundModem.ui">
<SubType>Designer</SubType>
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="tcpCode.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="resource1.h" />
<ClInclude Include="UZ7HOStuff.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="QtSoundModem.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="icon1.ico" />
<Image Include="soundmodem.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B12702AD-ABFB-343A-A199-8E24837244A3}</ProjectGuid>
<Keyword>QtVS_v301</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">
<QtMsBuild>$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Copy\</OutDir>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\Copy\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Copy\</OutDir>
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\Copy\</IntDir>
</PropertyGroup>
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtInstall>msvc2017</QtInstall>
<QtModules>core;gui;network;widgets</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtInstall>msvc2017</QtInstall>
<QtModules>core;gui;network;widgets</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalDependencies>libfftw3f-3.lib;setupapi.lib;WS2_32.Lib;$(QtDir)\lib\Qt5SerialPort.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalDependencies>libfftw3f-3.lib;setupapi.lib;WS2_32.Lib;$(QtDir)\lib\Qt5SerialPort.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ARDOPC.c" />
<ClCompile Include="ardopSampleArrays.c" />
<ClCompile Include="ax25.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="ax25_agw.c" />
<ClCompile Include="ax25_demod.c" />
<ClCompile Include="ax25_fec.c" />
<ClCompile Include="ax25_l2.c" />
<ClCompile Include="ax25_mod.c" />
<ClCompile Include="berlekamp.c" />
<ClCompile Include="BusyDetect.c" />
<ClCompile Include="Config.cpp">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Default</CompileAs>
</ClCompile>
<ClCompile Include="galois.c" />
<ClCompile Include="hid.c" />
<ClCompile Include="kiss_mode.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="Modulate.c" />
<ClCompile Include="ofdm.c" />
<ClCompile Include="pktARDOP.c" />
<ClCompile Include="QtSoundModem.cpp">
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">input</DynamicSource>
<QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).moc</QtMocFileName>
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">input</DynamicSource>
<QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).moc</QtMocFileName>
</ClCompile>
<ClCompile Include="rs.c" />
<ClCompile Include="RSUnit.c" />
<ClCompile Include="ShowFilter.cpp" />
<ClCompile Include="SMMain.c" />
<ClCompile Include="sm_main.c" />
<ClCompile Include="SoundInput.c" />
<ClCompile Include="tcpCode.cpp" />
<ClCompile Include="UZ7HOUtils.c" />
<ClCompile Include="Waveout.c" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="QtSoundModem.h" />
</ItemGroup>
<ItemGroup>
<QtUic Include="calibrateDialog.ui" />
<QtUic Include="devicesDialog.ui">
<SubType>Designer</SubType>
</QtUic>
<QtUic Include="filterWindow.ui" />
<QtUic Include="ModemDialog.ui">
<SubType>Designer</SubType>
</QtUic>
<QtUic Include="QtSoundModem.ui">
<SubType>Designer</SubType>
</QtUic>
</ItemGroup>
<ItemGroup>
<QtRcc Include="QtSoundModem.qrc" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="tcpCode.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="resource1.h" />
<ClInclude Include="UZ7HOStuff.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="QtSoundModem.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="icon1.ico" />
<Image Include="soundmodem.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

1536
RSUnit.c

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2766
SMMain.c

File diff suppressed because it is too large Load diff

View file

@ -1,234 +1,234 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
#include <QPainter>
// This displays a graph of the filter characteristics
#define c3 -1.5000000000000E+00f // cos(2*pi / 3) - 1;
#define c32 8.6602540378444E-01f // sin(2*pi / 3);
#define u5 1.2566370614359E+00f // 2*pi / 5;
#define c51 -1.2500000000000E+00f // (cos(u5) + cos(2*u5))/2 - 1;
#define c52 5.5901699437495E-01f // (cos(u5) - cos(2*u5))/2;
#define c53 -9.5105651629515E-0f //- sin(u5);
#define c54 -1.5388417685876E+00f //-(sin(u5) + sin(2*u5));
#define c55 3.6327126400268E-01f // (sin(u5) - sin(2*u5));
#define c8 = 7.0710678118655E-01f // 1 / sqrt(2);
float pnt_graph_buf[4096];
float graph_buf[4096];
float prev_graph_buf[4096];
float src_graph_buf[4096];
float graph_f;
float RealOut[4096];
short RealIn[4096];
float ImagOut[4096];
#define Image1Width 642
#define Image1Height 312
void filter_grid(QPainter * Painter)
{
int col = 20;
int row = 8;
int top_margin = 10;
int bottom_margin = 20;
int left_margin = 30;
int right_margin = 10;
int x, y;
float kx, ky;
QPen pen; // creates a default pen
pen.setStyle(Qt::DotLine);
Painter->setPen(pen);
ky = 35;
kx = (Image1Width - left_margin - right_margin - 2) / col;
for (y = 0; y < row; y++)
{
Painter->drawLine(
left_margin + 1,
top_margin + round(ky*y) + 1,
Image1Width - right_margin - 1,
top_margin + round(ky*y) + 1);
}
for (x = 0; x < col; x++)
{
Painter->drawLine(
left_margin + round(kx*x) + 1,
top_margin + 1,
left_margin + round(kx*x) + 1,
Image1Height - bottom_margin - 1);
}
pen.setStyle(Qt::SolidLine);
Painter->setPen(pen);
for (y = 0; y < row / 2; y++)
{
char Textxx[20];
sprintf(Textxx, "%d", y * -20);
Painter->drawLine(
left_margin + 1,
top_margin + round(ky*y * 2) + 1,
Image1Width - right_margin - 1,
top_margin + round(ky*y * 2) + 1);
Painter->drawText(
1,
top_margin + round(ky*y * 2) + 1,
100, 20, 0, Textxx);
}
for (x = 0; x <= col / 5; x++)
{
char Textxx[20];
sprintf(Textxx, "%d", x * 1000);
Painter->drawLine(
left_margin + round(kx*x * 5) + 1,
top_margin + 1,
left_margin + round(kx*x * 5) + 1,
Image1Height - bottom_margin - 1);
Painter->drawText(
top_margin + round(kx*x * 5) + 8,
Image1Height - 15,
100, 20, 0, Textxx);
}
}
extern "C" void FourierTransform(int NumSamples, short * RealIn, float * RealOut, float * ImagOut, int InverseTransform);
void make_graph(float * buf, int buflen, QPainter * Painter)
{
int top_margin = 10;
int bottom_margin = 20;
int left_margin = 30;
int i, y1, y2;
float pixel;
if (buflen == 0)
return;
for (i = 0; i <= buflen - 2; i++)
{
y1 = 1 - round(buf[i]);
if (y1 > Image1Height - top_margin - bottom_margin - 2)
y1 = Image1Height - top_margin - bottom_margin - 2;
y2 = 1 - round(buf[i + 1]);
if (y2 > Image1Height - top_margin - bottom_margin - 2)
y2 = Image1Height - top_margin - bottom_margin - 2;
// 150 pixels for 1000 Hz
// i is the bin number, but bin is not 10 Hz but 12000 /1024
// so freq = i * 12000 / 1024;
// and pixel is freq * 300 /1000
pixel = i * 12000.0f / 1024.0f;
pixel = pixel * 150.0f /1000.0f;
Painter->drawLine(
left_margin + pixel,
top_margin + y1,
left_margin + pixel + 1,
top_margin + y2);
}
}
void make_graph_buf(float * buf, short tap, QPainter * Painter)
{
int fft_size;
float max;
int i, k;
fft_size = 1024; // 12000 / 10; // 10hz on sample;
for (i = 0; i < tap; i++)
prev_graph_buf[i]= 0;
for (i = 0; i < fft_size; i++)
src_graph_buf[i] = 0;
src_graph_buf[0]= 1;
FIR_filter(src_graph_buf, fft_size, tap, buf, graph_buf, prev_graph_buf);
for (k = 0; k < fft_size; k++)
RealIn[k] = graph_buf[k] * 32768;
FourierTransform(fft_size, RealIn, RealOut, ImagOut, 0);
for (k = 0; k < (fft_size / 2) - 1; k++)
pnt_graph_buf[k] = powf(RealOut[k], 2) + powf(ImagOut[k], 2);
max = 0;
for (i = 0; i < (fft_size / 2) - 1; i++)
{
if (pnt_graph_buf[i] > max)
max = pnt_graph_buf[i];
}
if (max > 0)
{
for (i = 0; i < (fft_size / 2) - 1; i++)
pnt_graph_buf[i] = pnt_graph_buf[i] / max;
}
for (i = 0; i < (fft_size / 2) - 1; i++)
{
if (pnt_graph_buf[i] > 0)
pnt_graph_buf[i] = 70 * log10(pnt_graph_buf[i]);
else
pnt_graph_buf[i] = 0;
}
filter_grid(Painter);
Painter->setPen(Qt::blue);
make_graph(pnt_graph_buf, 400, Painter);
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
#include <QPainter>
// This displays a graph of the filter characteristics
#define c3 -1.5000000000000E+00f // cos(2*pi / 3) - 1;
#define c32 8.6602540378444E-01f // sin(2*pi / 3);
#define u5 1.2566370614359E+00f // 2*pi / 5;
#define c51 -1.2500000000000E+00f // (cos(u5) + cos(2*u5))/2 - 1;
#define c52 5.5901699437495E-01f // (cos(u5) - cos(2*u5))/2;
#define c53 -9.5105651629515E-0f //- sin(u5);
#define c54 -1.5388417685876E+00f //-(sin(u5) + sin(2*u5));
#define c55 3.6327126400268E-01f // (sin(u5) - sin(2*u5));
#define c8 = 7.0710678118655E-01f // 1 / sqrt(2);
float pnt_graph_buf[4096];
float graph_buf[4096];
float prev_graph_buf[4096];
float src_graph_buf[4096];
float graph_f;
float RealOut[4096];
short RealIn[4096];
float ImagOut[4096];
#define Image1Width 642
#define Image1Height 312
void filter_grid(QPainter * Painter)
{
int col = 20;
int row = 8;
int top_margin = 10;
int bottom_margin = 20;
int left_margin = 30;
int right_margin = 10;
int x, y;
float kx, ky;
QPen pen; // creates a default pen
pen.setStyle(Qt::DotLine);
Painter->setPen(pen);
ky = 35;
kx = (Image1Width - left_margin - right_margin - 2) / col;
for (y = 0; y < row; y++)
{
Painter->drawLine(
left_margin + 1,
top_margin + round(ky*y) + 1,
Image1Width - right_margin - 1,
top_margin + round(ky*y) + 1);
}
for (x = 0; x < col; x++)
{
Painter->drawLine(
left_margin + round(kx*x) + 1,
top_margin + 1,
left_margin + round(kx*x) + 1,
Image1Height - bottom_margin - 1);
}
pen.setStyle(Qt::SolidLine);
Painter->setPen(pen);
for (y = 0; y < row / 2; y++)
{
char Textxx[20];
sprintf(Textxx, "%d", y * -20);
Painter->drawLine(
left_margin + 1,
top_margin + round(ky*y * 2) + 1,
Image1Width - right_margin - 1,
top_margin + round(ky*y * 2) + 1);
Painter->drawText(
1,
top_margin + round(ky*y * 2) + 1,
100, 20, 0, Textxx);
}
for (x = 0; x <= col / 5; x++)
{
char Textxx[20];
sprintf(Textxx, "%d", x * 1000);
Painter->drawLine(
left_margin + round(kx*x * 5) + 1,
top_margin + 1,
left_margin + round(kx*x * 5) + 1,
Image1Height - bottom_margin - 1);
Painter->drawText(
top_margin + round(kx*x * 5) + 8,
Image1Height - 15,
100, 20, 0, Textxx);
}
}
extern "C" void FourierTransform(int NumSamples, short * RealIn, float * RealOut, float * ImagOut, int InverseTransform);
void make_graph(float * buf, int buflen, QPainter * Painter)
{
int top_margin = 10;
int bottom_margin = 20;
int left_margin = 30;
int i, y1, y2;
float pixel;
if (buflen == 0)
return;
for (i = 0; i <= buflen - 2; i++)
{
y1 = 1 - round(buf[i]);
if (y1 > Image1Height - top_margin - bottom_margin - 2)
y1 = Image1Height - top_margin - bottom_margin - 2;
y2 = 1 - round(buf[i + 1]);
if (y2 > Image1Height - top_margin - bottom_margin - 2)
y2 = Image1Height - top_margin - bottom_margin - 2;
// 150 pixels for 1000 Hz
// i is the bin number, but bin is not 10 Hz but 12000 /1024
// so freq = i * 12000 / 1024;
// and pixel is freq * 300 /1000
pixel = i * 12000.0f / 1024.0f;
pixel = pixel * 150.0f /1000.0f;
Painter->drawLine(
left_margin + pixel,
top_margin + y1,
left_margin + pixel + 1,
top_margin + y2);
}
}
void make_graph_buf(float * buf, short tap, QPainter * Painter)
{
int fft_size;
float max;
int i, k;
fft_size = 1024; // 12000 / 10; // 10hz on sample;
for (i = 0; i < tap; i++)
prev_graph_buf[i]= 0;
for (i = 0; i < fft_size; i++)
src_graph_buf[i] = 0;
src_graph_buf[0]= 1;
FIR_filter(src_graph_buf, fft_size, tap, buf, graph_buf, prev_graph_buf);
for (k = 0; k < fft_size; k++)
RealIn[k] = graph_buf[k] * 32768;
FourierTransform(fft_size, RealIn, RealOut, ImagOut, 0);
for (k = 0; k < (fft_size / 2) - 1; k++)
pnt_graph_buf[k] = powf(RealOut[k], 2) + powf(ImagOut[k], 2);
max = 0;
for (i = 0; i < (fft_size / 2) - 1; i++)
{
if (pnt_graph_buf[i] > max)
max = pnt_graph_buf[i];
}
if (max > 0)
{
for (i = 0; i < (fft_size / 2) - 1; i++)
pnt_graph_buf[i] = pnt_graph_buf[i] / max;
}
for (i = 0; i < (fft_size / 2) - 1; i++)
{
if (pnt_graph_buf[i] > 0)
pnt_graph_buf[i] = 70 * log10(pnt_graph_buf[i]);
else
pnt_graph_buf[i] = 0;
}
filter_grid(Painter);
Painter->setPen(Qt::blue);
make_graph(pnt_graph_buf, 400, Painter);
}

10506
SoundInput.c

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,321 +1,321 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
// TStringlist And String emulation Functions
// Dephi seems to mix starting counts at 0 or 1. I'll try making everything
// base zero.
// Initialise a list
void CreateStringList(TStringList * List)
{
List->Count = 0;
List->Items = 0;
}
int Count(TStringList * List)
{
return List->Count;
}
string * newString()
{
// Creates and Initialises a string
UCHAR * ptr = malloc(sizeof(string)); // Malloc Data separately so it can be ralloc'ed
string * New = (string *)ptr;
New->Length = 0;
New->AllocatedLength = 256;
New->Data = malloc(256);
return New;
}
void initString(string * S)
{
S->Length = 0;
S->AllocatedLength = 256;
S->Data = malloc(256);
}
void initTStringList(TStringList* T)
{
//string * New = newString();
T->Count = 0;
T->Items = NULL;
//Add(T, New);
}
TStringList * newTStringList()
{
TStringList * T = (TStringList *) malloc(sizeof(TStringList));
string * New = newString();
T->Count = 0;
T->Items = NULL;
Add(T, New);
return T;
}
void freeString(string * Msg)
{
if (Msg->Data)
free(Msg->Data);
free(Msg);
}
string * Strings(TStringList * Q, int Index)
{
if (Index >= Q->Count)
return NULL;
return Q->Items[Index];
}
int Add(TStringList * Q, string * Entry)
{
Q->Items = realloc(Q->Items,(Q->Count + 1) * sizeof(void *));
Q->Items[Q->Count++] = Entry;
return (Q->Count);
}
void mydelete(string * Source, int StartChar, int Count)
{
//Description
//The Delete procedure deletes up to Count characters from the passed parameter Source string starting
//from position StartChar.
if (StartChar > Source->Length)
return;
int left = Source->Length - StartChar;
if (Count > left)
Count = left;
memmove(&Source->Data[StartChar], &Source->Data[StartChar + Count], left - Count);
Source->Length -= Count;
}
void Delete(TStringList * Q, int Index)
{
// Remove item at Index and move rest up list
// Index starts at zero
if (Index >= Q->Count)
return;
// We should free it, so user must duplicate msg if needed after delete
freeString(Q->Items[Index]);
// free(Q->Items[Index]);
Q->Count--;
while (Index < Q->Count)
{
Q->Items[Index] = Q->Items[Index + 1];
Index++;
}
}
void setlength(string * Msg, int Count)
{
// Set length, allocating more space if needed
if (Count > Msg->AllocatedLength)
{
Msg->AllocatedLength = Count + 256;
Msg->Data = realloc(Msg->Data, Msg->AllocatedLength);
}
Msg->Length = Count;
}
string * stringAdd(string * Msg, UCHAR * Chars, int Count)
{
// Add Chars to string
if (Msg->Length + Count > Msg->AllocatedLength)
{
Msg->AllocatedLength += Count + 256;
Msg->Data = realloc(Msg->Data, Msg->AllocatedLength);
}
memcpy(&Msg->Data[Msg->Length], Chars, Count);
Msg->Length += Count;
return Msg;
}
void Clear(TStringList * Q)
{
int i = 0;
if (Q->Items == NULL)
return;
while (Q->Count)
{
freeString(Q->Items[i++]);
Q->Count--;
}
free(Q->Items);
Q->Items = NULL;
}
// procedure move ( const SourcePointer; var DestinationPointer; CopyCount : Integer ) ;
// Description
// The move procedure is a badly named method of copying a section of memory from one place to another.
// CopyCount bytes are copied from storage referenced by SourcePointer and written to DestinationPointer
void move(UCHAR * SourcePointer, UCHAR * DestinationPointer, int CopyCount)
{
memmove(DestinationPointer, SourcePointer, CopyCount);
}
void fmove(float * SourcePointer, float * DestinationPointer, int CopyCount)
{
memmove(DestinationPointer, SourcePointer, CopyCount);
}
//Description
//The copy function has 2 forms. In the first, it creates a new string from part of an existing string. In the second, it creates a new array from part of an existing array.
//1.String copy
//The first character of a string has index = 1.
//Up to Count characters are copied from the StartChar of the Source string to the returned string.
//Less than Count characters if the end of the Source string is encountered before Count characters have been copied.
string * copy(string * Source, int StartChar, int Count)
{
string * NewString = newString();
int end = StartChar + Count;
if (end > Source->Length)
Count = Source->Length - StartChar;
memcpy(NewString->Data, &Source->Data[StartChar], Count);
NewString->Length = Count;
return NewString;
}
// Duplicate from > to
void Assign(TStringList * to, TStringList * from)
{
int i;
Clear(to);
if (from->Count == 0)
return;
// Duplicate each item
for (i = 0; i < from->Count; i++)
{
string * new = newString();
stringAdd(new, from->Items[i]->Data, from->Items[i]->Length);
Add(to, new);
}
}
string * duplicateString(string * in)
{
string * new = newString();
stringAdd(new, in->Data, in->Length);
return new;
}
double pila(double x)
{
//x : = frac(x); The frac function returns the fractional part of a floating point number.
double whole;
double rem;
rem = modf(x, &whole); // returns fraction, writes whole to whole
if (rem != rem)
rem = 0;
if (rem > 0.5)
rem = 1 - rem;
return 2 * rem;
}
boolean compareStrings(string * a, string * b)
{
if (a->Length == b->Length && memcmp(a->Data, b->Data, a->Length) == 0)
return TRUE;
return FALSE;
}
// This looks for a string in a stringlist. Returns index if found, otherwise -1
int my_indexof(TStringList * l, string * s)
{
int i;
for (i = 0; i < l->Count; i++)
{
// Need to compare count and data - C doesn't allow struct compare
if (l->Items[i]->Length == s->Length && memcmp(l->Items[i]->Data, s->Data, s->Length) == 0)
return i;
}
return -1;
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
// TStringlist And String emulation Functions
// Dephi seems to mix starting counts at 0 or 1. I'll try making everything
// base zero.
// Initialise a list
void CreateStringList(TStringList * List)
{
List->Count = 0;
List->Items = 0;
}
int Count(TStringList * List)
{
return List->Count;
}
string * newString()
{
// Creates and Initialises a string
UCHAR * ptr = malloc(sizeof(string)); // Malloc Data separately so it can be ralloc'ed
string * New = (string *)ptr;
New->Length = 0;
New->AllocatedLength = 256;
New->Data = malloc(256);
return New;
}
void initString(string * S)
{
S->Length = 0;
S->AllocatedLength = 256;
S->Data = malloc(256);
}
void initTStringList(TStringList* T)
{
//string * New = newString();
T->Count = 0;
T->Items = NULL;
//Add(T, New);
}
TStringList * newTStringList()
{
TStringList * T = (TStringList *) malloc(sizeof(TStringList));
string * New = newString();
T->Count = 0;
T->Items = NULL;
Add(T, New);
return T;
}
void freeString(string * Msg)
{
if (Msg->Data)
free(Msg->Data);
free(Msg);
}
string * Strings(TStringList * Q, int Index)
{
if (Index >= Q->Count)
return NULL;
return Q->Items[Index];
}
int Add(TStringList * Q, string * Entry)
{
Q->Items = realloc(Q->Items,(Q->Count + 1) * sizeof(void *));
Q->Items[Q->Count++] = Entry;
return (Q->Count);
}
void mydelete(string * Source, int StartChar, int Count)
{
//Description
//The Delete procedure deletes up to Count characters from the passed parameter Source string starting
//from position StartChar.
if (StartChar > Source->Length)
return;
int left = Source->Length - StartChar;
if (Count > left)
Count = left;
memmove(&Source->Data[StartChar], &Source->Data[StartChar + Count], left - Count);
Source->Length -= Count;
}
void Delete(TStringList * Q, int Index)
{
// Remove item at Index and move rest up list
// Index starts at zero
if (Index >= Q->Count)
return;
// We should free it, so user must duplicate msg if needed after delete
freeString(Q->Items[Index]);
// free(Q->Items[Index]);
Q->Count--;
while (Index < Q->Count)
{
Q->Items[Index] = Q->Items[Index + 1];
Index++;
}
}
void setlength(string * Msg, int Count)
{
// Set length, allocating more space if needed
if (Count > Msg->AllocatedLength)
{
Msg->AllocatedLength = Count + 256;
Msg->Data = realloc(Msg->Data, Msg->AllocatedLength);
}
Msg->Length = Count;
}
string * stringAdd(string * Msg, UCHAR * Chars, int Count)
{
// Add Chars to string
if (Msg->Length + Count > Msg->AllocatedLength)
{
Msg->AllocatedLength += Count + 256;
Msg->Data = realloc(Msg->Data, Msg->AllocatedLength);
}
memcpy(&Msg->Data[Msg->Length], Chars, Count);
Msg->Length += Count;
return Msg;
}
void Clear(TStringList * Q)
{
int i = 0;
if (Q->Items == NULL)
return;
while (Q->Count)
{
freeString(Q->Items[i++]);
Q->Count--;
}
free(Q->Items);
Q->Items = NULL;
}
// procedure move ( const SourcePointer; var DestinationPointer; CopyCount : Integer ) ;
// Description
// The move procedure is a badly named method of copying a section of memory from one place to another.
// CopyCount bytes are copied from storage referenced by SourcePointer and written to DestinationPointer
void move(UCHAR * SourcePointer, UCHAR * DestinationPointer, int CopyCount)
{
memmove(DestinationPointer, SourcePointer, CopyCount);
}
void fmove(float * SourcePointer, float * DestinationPointer, int CopyCount)
{
memmove(DestinationPointer, SourcePointer, CopyCount);
}
//Description
//The copy function has 2 forms. In the first, it creates a new string from part of an existing string. In the second, it creates a new array from part of an existing array.
//1.String copy
//The first character of a string has index = 1.
//Up to Count characters are copied from the StartChar of the Source string to the returned string.
//Less than Count characters if the end of the Source string is encountered before Count characters have been copied.
string * copy(string * Source, int StartChar, int Count)
{
string * NewString = newString();
int end = StartChar + Count;
if (end > Source->Length)
Count = Source->Length - StartChar;
memcpy(NewString->Data, &Source->Data[StartChar], Count);
NewString->Length = Count;
return NewString;
}
// Duplicate from > to
void Assign(TStringList * to, TStringList * from)
{
int i;
Clear(to);
if (from->Count == 0)
return;
// Duplicate each item
for (i = 0; i < from->Count; i++)
{
string * new = newString();
stringAdd(new, from->Items[i]->Data, from->Items[i]->Length);
Add(to, new);
}
}
string * duplicateString(string * in)
{
string * new = newString();
stringAdd(new, in->Data, in->Length);
return new;
}
double pila(double x)
{
//x : = frac(x); The frac function returns the fractional part of a floating point number.
double whole;
double rem;
rem = modf(x, &whole); // returns fraction, writes whole to whole
if (rem != rem)
rem = 0;
if (rem > 0.5)
rem = 1 - rem;
return 2 * rem;
}
boolean compareStrings(string * a, string * b)
{
if (a->Length == b->Length && memcmp(a->Data, b->Data, a->Length) == 0)
return TRUE;
return FALSE;
}
// This looks for a string in a stringlist. Returns index if found, otherwise -1
int my_indexof(TStringList * l, string * s)
{
int i;
for (i = 0; i < l->Count; i++)
{
// Need to compare count and data - C doesn't allow struct compare
if (l->Items[i]->Length == s->Length && memcmp(l->Items[i]->Data, s->Data, s->Length) == 0)
return i;
}
return -1;
}

1984
Waveout.c

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

654
audio.c
View file

@ -1,327 +1,327 @@
//
// This file is part of Dire Wolf, an amateur radio packet TNC.
//
// Copyright (C) 2011, 2012, 2013, 2014, 2015 John Langner, WB2OSZ
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// I've extracted the OSS bits from Direwolf's audio.c for use in QtSoundModem
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
#ifdef __OpenBSD__
#include <soundcard.h>
#else
#include <sys/soundcard.h>
#endif
void Debugprintf(const char * format, ...);
extern int Closing;
int oss_fd = -1; /* Single device, both directions. */
int insize = 0;
short rxbuffer[2400]; // 1200 stereo samples
int num_channels = 2; /* Should be 1 for mono or 2 for stereo. */
int samples_per_sec = 12000; /* Audio sampling rate. Typically 11025, 22050, or 44100. */
int bits_per_sample = 16; /* 8 (unsigned char) or 16 (signed short). */
// Originally 40. Version 1.2, try 10 for lower latency.
#define ONE_BUF_TIME 10
static int set_oss_params(int fd);
#define roundup1k(n) (((n) + 0x3ff) & ~0x3ff)
static int calcbufsize(int rate, int chans, int bits)
{
int size1 = (rate * chans * bits / 8 * ONE_BUF_TIME) / 1000;
int size2 = roundup1k(size1);
#if DEBUG
text_color_set(DW_COLOR_DEBUG);
printf("audio_open: calcbufsize (rate=%d, chans=%d, bits=%d) calc size=%d, round up to %d\n",
rate, chans, bits, size1, size2);
#endif
return (size2);
}
int oss_audio_open(char * adevice_in, char * adevice_out)
{
char audio_in_name[30];
char audio_out_name[30];
strcpy(audio_in_name, adevice_in);
strcpy(audio_out_name, adevice_out);
if (strcmp(audio_in_name, audio_out_name) == 0)
{
printf("Audio device for both receive and transmit: %s \n", audio_in_name);
}
else
{
printf("Audio input device for receive: %s\n", audio_in_name);
printf("Audio out device for transmit: %s\n", audio_out_name);
}
oss_fd = open(audio_in_name, O_RDWR);
if (oss_fd < 0)
{
printf("Could not open audio device %s\n", audio_in_name);
return 0;
}
else
printf("OSS fd = %d\n", oss_fd);
return set_oss_params(oss_fd);
}
static int set_oss_params(int fd)
{
int err;
int devcaps;
int asked_for;
int ossbuf_size_in_bytes;
int frag = (5 << 16) | (11);
err = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag);
if (err == -1)
{
perror("Not able to set fragment size");
// ossbuf_size_in_bytes = 2048; /* pick something reasonable */
}
err = ioctl(fd, SNDCTL_DSP_CHANNELS, &num_channels);
if (err == -1)
{
perror("Not able to set audio device number of channels");
return (0);
}
asked_for = samples_per_sec;
err = ioctl(fd, SNDCTL_DSP_SPEED, &samples_per_sec);
if (err == -1)
{
perror("Not able to set audio device sample rate");
return (0);
}
printf("Asked for %d samples/sec but actually using %d.\n", asked_for, samples_per_sec);
/* This is actually a bit mask but it happens that */
/* 0x8 is unsigned 8 bit samples and */
/* 0x10 is signed 16 bit little endian. */
err = ioctl(fd, SNDCTL_DSP_SETFMT, &bits_per_sample);
if (err == -1)
{
perror("Not able to set audio device sample size");
return (0);
}
/*
* Determine capabilities.
*/
err = ioctl(fd, SNDCTL_DSP_GETCAPS, &devcaps);
if (err == -1)
{
perror("Not able to get audio device capabilities");
// Is this fatal? // return (-1);
}
printf("audio_open(): devcaps = %08x\n", devcaps);
if (devcaps & DSP_CAP_DUPLEX) printf("Full duplex record/playback.\n");
if (devcaps & DSP_CAP_BATCH) printf("Device has some kind of internal buffers which may cause delays.\n");
if (devcaps & ~(DSP_CAP_DUPLEX | DSP_CAP_BATCH)) printf("Others...\n");
if (!(devcaps & DSP_CAP_DUPLEX))
{
printf("Audio device does not support full duplex\n");
// Do we care? // return (-1);
}
err = ioctl(fd, SNDCTL_DSP_SETDUPLEX, NULL);
if (err == -1)
{
perror("Not able to set audio full duplex mode");
// Unfortunate but not a disaster.
}
/*
* Get preferred block size.
* Presumably this will provide the most efficient transfer.
*
* In my particular situation, this turned out to be
* 2816 for 11025 Hz 16 bit mono
* 5568 for 11025 Hz 16 bit stereo
* 11072 for 44100 Hz 16 bit mono
*
* This was long ago under different conditions.
* Should study this again some day.
*
* Your milage may vary.
*/
err = ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &ossbuf_size_in_bytes);
if (err == -1)
{
perror("Not able to get audio block size");
ossbuf_size_in_bytes = 2048; /* pick something reasonable */
}
printf("audio_open(): suggestd block size is %d\n", ossbuf_size_in_bytes);
/*
* That's 1/8 of a second which seems rather long if we want to
* respond quickly.
*/
ossbuf_size_in_bytes = calcbufsize(samples_per_sec, num_channels, bits_per_sample);
printf("audio_open(): using block size of %d\n", ossbuf_size_in_bytes);
/* Version 1.3 - after a report of this situation for Mac OSX version. */
if (ossbuf_size_in_bytes < 256 || ossbuf_size_in_bytes > 32768)
{
printf("Audio buffer has unexpected extreme size of %d bytes.\n", ossbuf_size_in_bytes);
printf("Detected at %s, line %d.\n", __FILE__, __LINE__);
printf("This might be caused by unusual audio device configuration values.\n");
ossbuf_size_in_bytes = 2048;
printf("Using %d to attempt recovery.\n", ossbuf_size_in_bytes);
}
return (ossbuf_size_in_bytes);
}
int oss_read(short * samples, int nSamples)
{
int n;
int nBytes = nSamples * 4;
if (oss_fd < 0)
return 0;
// printf("audio_get(): read %d\n", nBytes - insize);
n = read(oss_fd, &rxbuffer[insize], nBytes - insize);
if (n < 0)
{
perror("Can't read from audio device");
insize = 0;
return (0);
}
insize += n;
if (n == nSamples * 4)
{
memcpy(samples, rxbuffer, insize);
insize = 0;
return nSamples;
}
return 0;
}
int oss_write(short * ptr, int len)
{
int k;
// int delay;
// ioctl(oss_fd, SNDCTL_DSP_GETODELAY, &delay);
// Debugprintf("Delay %d", delay);
k = write(oss_fd, ptr, len * 4);
//
if (k < 0)
{
perror("Can't write to audio device");
return (-1);
}
if (k < len * 4)
{
printf("oss_write(): write %d returns %d\n", len * 4, k);
/* presumably full but didn't block. */
usleep(10000);
}
ptr += k;
len -= k;
return 0;
}
void oss_flush()
{
int delay;
if (oss_fd < 0)
{
Debugprintf("OSS Flush Called when OSS closed");
return;
}
ioctl(oss_fd, SNDCTL_DSP_GETODELAY, &delay);
Debugprintf("OSS Flush Delay %d", delay);
while (delay)
{
Sleep(10);
ioctl(oss_fd, SNDCTL_DSP_GETODELAY, &delay);
// Debugprintf("Flush Delay %d", delay);
}
}
void oss_audio_close(void)
{
if (oss_fd > 0)
{
close(oss_fd);
oss_fd = -1;
}
return;
}
//
// This file is part of Dire Wolf, an amateur radio packet TNC.
//
// Copyright (C) 2011, 2012, 2013, 2014, 2015 John Langner, WB2OSZ
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// I've extracted the OSS bits from Direwolf's audio.c for use in QtSoundModem
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
#ifdef __OpenBSD__
#include <soundcard.h>
#else
#include <sys/soundcard.h>
#endif
void Debugprintf(const char * format, ...);
extern int Closing;
int oss_fd = -1; /* Single device, both directions. */
int insize = 0;
short rxbuffer[2400]; // 1200 stereo samples
int num_channels = 2; /* Should be 1 for mono or 2 for stereo. */
int samples_per_sec = 12000; /* Audio sampling rate. Typically 11025, 22050, or 44100. */
int bits_per_sample = 16; /* 8 (unsigned char) or 16 (signed short). */
// Originally 40. Version 1.2, try 10 for lower latency.
#define ONE_BUF_TIME 10
static int set_oss_params(int fd);
#define roundup1k(n) (((n) + 0x3ff) & ~0x3ff)
static int calcbufsize(int rate, int chans, int bits)
{
int size1 = (rate * chans * bits / 8 * ONE_BUF_TIME) / 1000;
int size2 = roundup1k(size1);
#if DEBUG
text_color_set(DW_COLOR_DEBUG);
printf("audio_open: calcbufsize (rate=%d, chans=%d, bits=%d) calc size=%d, round up to %d\n",
rate, chans, bits, size1, size2);
#endif
return (size2);
}
int oss_audio_open(char * adevice_in, char * adevice_out)
{
char audio_in_name[30];
char audio_out_name[30];
strcpy(audio_in_name, adevice_in);
strcpy(audio_out_name, adevice_out);
if (strcmp(audio_in_name, audio_out_name) == 0)
{
printf("Audio device for both receive and transmit: %s \n", audio_in_name);
}
else
{
printf("Audio input device for receive: %s\n", audio_in_name);
printf("Audio out device for transmit: %s\n", audio_out_name);
}
oss_fd = open(audio_in_name, O_RDWR);
if (oss_fd < 0)
{
printf("Could not open audio device %s\n", audio_in_name);
return 0;
}
else
printf("OSS fd = %d\n", oss_fd);
return set_oss_params(oss_fd);
}
static int set_oss_params(int fd)
{
int err;
int devcaps;
int asked_for;
int ossbuf_size_in_bytes;
int frag = (5 << 16) | (11);
err = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag);
if (err == -1)
{
perror("Not able to set fragment size");
// ossbuf_size_in_bytes = 2048; /* pick something reasonable */
}
err = ioctl(fd, SNDCTL_DSP_CHANNELS, &num_channels);
if (err == -1)
{
perror("Not able to set audio device number of channels");
return (0);
}
asked_for = samples_per_sec;
err = ioctl(fd, SNDCTL_DSP_SPEED, &samples_per_sec);
if (err == -1)
{
perror("Not able to set audio device sample rate");
return (0);
}
printf("Asked for %d samples/sec but actually using %d.\n", asked_for, samples_per_sec);
/* This is actually a bit mask but it happens that */
/* 0x8 is unsigned 8 bit samples and */
/* 0x10 is signed 16 bit little endian. */
err = ioctl(fd, SNDCTL_DSP_SETFMT, &bits_per_sample);
if (err == -1)
{
perror("Not able to set audio device sample size");
return (0);
}
/*
* Determine capabilities.
*/
err = ioctl(fd, SNDCTL_DSP_GETCAPS, &devcaps);
if (err == -1)
{
perror("Not able to get audio device capabilities");
// Is this fatal? // return (-1);
}
printf("audio_open(): devcaps = %08x\n", devcaps);
if (devcaps & DSP_CAP_DUPLEX) printf("Full duplex record/playback.\n");
if (devcaps & DSP_CAP_BATCH) printf("Device has some kind of internal buffers which may cause delays.\n");
if (devcaps & ~(DSP_CAP_DUPLEX | DSP_CAP_BATCH)) printf("Others...\n");
if (!(devcaps & DSP_CAP_DUPLEX))
{
printf("Audio device does not support full duplex\n");
// Do we care? // return (-1);
}
err = ioctl(fd, SNDCTL_DSP_SETDUPLEX, NULL);
if (err == -1)
{
perror("Not able to set audio full duplex mode");
// Unfortunate but not a disaster.
}
/*
* Get preferred block size.
* Presumably this will provide the most efficient transfer.
*
* In my particular situation, this turned out to be
* 2816 for 11025 Hz 16 bit mono
* 5568 for 11025 Hz 16 bit stereo
* 11072 for 44100 Hz 16 bit mono
*
* This was long ago under different conditions.
* Should study this again some day.
*
* Your milage may vary.
*/
err = ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &ossbuf_size_in_bytes);
if (err == -1)
{
perror("Not able to get audio block size");
ossbuf_size_in_bytes = 2048; /* pick something reasonable */
}
printf("audio_open(): suggestd block size is %d\n", ossbuf_size_in_bytes);
/*
* That's 1/8 of a second which seems rather long if we want to
* respond quickly.
*/
ossbuf_size_in_bytes = calcbufsize(samples_per_sec, num_channels, bits_per_sample);
printf("audio_open(): using block size of %d\n", ossbuf_size_in_bytes);
/* Version 1.3 - after a report of this situation for Mac OSX version. */
if (ossbuf_size_in_bytes < 256 || ossbuf_size_in_bytes > 32768)
{
printf("Audio buffer has unexpected extreme size of %d bytes.\n", ossbuf_size_in_bytes);
printf("Detected at %s, line %d.\n", __FILE__, __LINE__);
printf("This might be caused by unusual audio device configuration values.\n");
ossbuf_size_in_bytes = 2048;
printf("Using %d to attempt recovery.\n", ossbuf_size_in_bytes);
}
return (ossbuf_size_in_bytes);
}
int oss_read(short * samples, int nSamples)
{
int n;
int nBytes = nSamples * 4;
if (oss_fd < 0)
return 0;
// printf("audio_get(): read %d\n", nBytes - insize);
n = read(oss_fd, &rxbuffer[insize], nBytes - insize);
if (n < 0)
{
perror("Can't read from audio device");
insize = 0;
return (0);
}
insize += n;
if (n == nSamples * 4)
{
memcpy(samples, rxbuffer, insize);
insize = 0;
return nSamples;
}
return 0;
}
int oss_write(short * ptr, int len)
{
int k;
// int delay;
// ioctl(oss_fd, SNDCTL_DSP_GETODELAY, &delay);
// Debugprintf("Delay %d", delay);
k = write(oss_fd, ptr, len * 4);
//
if (k < 0)
{
perror("Can't write to audio device");
return (-1);
}
if (k < len * 4)
{
printf("oss_write(): write %d returns %d\n", len * 4, k);
/* presumably full but didn't block. */
usleep(10000);
}
ptr += k;
len -= k;
return 0;
}
void oss_flush()
{
int delay;
if (oss_fd < 0)
{
Debugprintf("OSS Flush Called when OSS closed");
return;
}
ioctl(oss_fd, SNDCTL_DSP_GETODELAY, &delay);
Debugprintf("OSS Flush Delay %d", delay);
while (delay)
{
Sleep(10);
ioctl(oss_fd, SNDCTL_DSP_GETODELAY, &delay);
// Debugprintf("Flush Delay %d", delay);
}
}
void oss_audio_close(void)
{
if (oss_fd > 0)
{
close(oss_fd);
oss_fd = -1;
}
return;
}

6522
ax25.c

File diff suppressed because it is too large Load diff

2987
ax25_agw.c

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,417 +1,417 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
//void fx25_encode_rs(byte * data, byte * parity, int pad, int rs_size);
//int fx25_decode_rs(byte * data, int * eras_pos, int no_eras, int pad, int rs_size);
#define FX25_FCR 1
#define FX25_PRIM 1
#define FX25_IPRIM 1
#define FX25_MM 8
#define FX25_NN 255
#define FX25_A0 FX25_NN
Byte FX25_ALPHA_TO[256] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,
0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,
0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,
0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,
0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,
0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,
0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,
0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,
0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,
0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,
0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,
0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,
0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,
0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,
0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,
0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00
};
Byte FX25_INDEX_OF[256] = {
255, 0, 1, 25, 2, 50, 26,198, 3,223, 51,238, 27,104,199, 75,
4,100,224, 14, 52,141,239,129, 28,193,105,248,200, 8, 76,113,
5,138,101, 47,225, 36, 15, 33, 53,147,142,218,240, 18,130, 69,
29,181,194,125,106, 39,249,185,201,154, 9,120, 77,228,114,166,
6,191,139, 98,102,221, 48,253,226,152, 37,179, 16,145, 34,136,
54,208,148,206,143,150,219,189,241,210, 19, 92,131, 56, 70, 64,
30, 66,182,163,195, 72,126,110,107, 58, 40, 84,250,133,186, 61,
202, 94,155,159, 10, 21,121, 43, 78,212,229,172,115,243,167, 87,
7,112,192,247,140,128, 99, 13,103, 74,222,237, 49,197,254, 24,
227,165,153,119, 38,184,180,124, 17, 68,146,217, 35, 32,137, 46,
55, 63,209, 91,149,188,207,205,144,135,151,178,220,252,190, 97,
242, 86,211,171, 20, 42, 93,158,132, 60, 57, 83, 71,109, 65,162,
31, 45, 67,216,183,123,164,118,196, 23, 73,236,127, 12,111,246,
108,161, 59, 82, 41,157, 85,170,251, 96,134,177,187,204, 62, 90,
203, 89, 95,176,156,169,160, 81, 11,245, 22,235,122,117, 44,215,
79,174,213,233,230,231,173,232,116,214,244,234,168, 80, 88,175
};
Byte FX25_CCSDS_poly_8[9] =
{ 29, 188, 142, 221, 118, 206, 52, 168, 0 };
Byte FX25_CCSDS_poly_16[17] =
{136,240,208,195,181,158,201,100, 11, 83,167,107,113,110,106,121, 0 };
Byte FX25_CCSDS_poly_32[33] = {
18,251,215, 28, 80,107,248, 53, 84,194, 91, 59,176, 99,203,137,
43,104,137, 0, 44,149,148,218, 75, 11,173,254,194,109, 8, 11,
0 };
Byte FX25_CCSDS_poly_64[65] = {
40, 21,218, 23, 48,237, 69, 6, 87, 42, 29,193,160,150,113, 32,
35,172,241,240,184, 90,188,225, 87,130,254, 41,245,253,184,241,
188,176, 54, 58,240,226,119,185, 77,150, 48,140,169,160, 96,217,
15,202,218,190,135,103,129, 77, 57,166,164, 12, 13,178, 53, 46,
0 };
integer FX25_NROOTS ;
Byte FX25_GENPOLY[256];
Byte MODNN(int x)
{
return x % 255;
}
void encode_rs(Byte * data, Byte * parity, int pad)
{
int i, j;
Byte feedback;
memset(parity, 0, FX25_NROOTS);
i = 0;
while (i < FX25_NN - FX25_NROOTS - pad)
{
feedback = FX25_INDEX_OF[data[i] ^ parity[0]];
if (feedback != FX25_A0)
{
j = 1;
while (j < FX25_NROOTS)
{
parity[j] = parity[j] ^ FX25_ALPHA_TO[MODNN(feedback + FX25_GENPOLY[FX25_NROOTS - j])];
j++;
}
}
move(&parity[1], &parity[0], FX25_NROOTS - 1);
if (feedback != FX25_A0)
parity[FX25_NROOTS - 1] = FX25_ALPHA_TO[MODNN(feedback + FX25_GENPOLY[0])];
else
parity[FX25_NROOTS - 1] = 0;
i++;
}
}
int FX25_MIN(int a, int b)
{
if (a > b)
return b;
else
return a;
}
int decode_rs(Byte * data, int * eras_pos, int no_eras, int pad)
{
int deg_lambda, el, deg_omega;
int i, j, r, k;
Byte q, tmp, num1, num2, den, discr_r;
Byte s[256];
Byte lambda[256];
Byte b[256];
Byte t[256];
Byte omega[256];
Byte root[256];
Byte reg[256];
Byte loc[256];
int syn_error, count = 0;
if (pad < 0 || pad>238)
return -1;
i = 0;
while (i < FX25_NROOTS)
{
s[i] = data[0];
i++;
}
j = 1;
while (j < FX25_NN - pad)
{
i = 0;
while (i < FX25_NROOTS)
{
if (s[i] == 0)
s[i] = data[j];
else
s[i] = data[j] ^ FX25_ALPHA_TO[MODNN(FX25_INDEX_OF[s[i]] + (FX25_FCR + i)*FX25_PRIM)];
i++;
}
j++;
}
syn_error = 0;
i = 0;
while (i < FX25_NROOTS)
{
syn_error = syn_error | s[i];
s[i] = FX25_INDEX_OF[s[i]];
i++;
}
if (syn_error == 0)
return count;
memset(&lambda[1], 0, FX25_NROOTS);
lambda[0] = 1;
i = 0;
while (i < FX25_NROOTS + 1)
{
b[i] = FX25_INDEX_OF[lambda[i]];
i++;
}
r = no_eras;
el = no_eras;
r++;
while (r <= FX25_NROOTS)
{
discr_r = 0;
i = 0;
while (i < r)
{
if (lambda[i] != 0 && s[r - i - 1] != FX25_A0)
discr_r = discr_r ^ FX25_ALPHA_TO[MODNN(FX25_INDEX_OF[lambda[i]] + s[r - i - 1])];
i++;
}
discr_r = FX25_INDEX_OF[discr_r];
if (discr_r == FX25_A0)
{
move(&b[0], &b[1], FX25_NROOTS);
b[0] = FX25_A0;
}
else
{
t[0] = lambda[0];
i = 0;
while (i < FX25_NROOTS)
{
if (b[i] != FX25_A0)
t[i + 1] = lambda[i + 1] ^ FX25_ALPHA_TO[MODNN(discr_r + b[i])];
else
t[i + 1] = lambda[i + 1];
i++;
}
if (2 * el <= r + no_eras - 1)
{
el = r + no_eras - el;
i = 0;
while (i <= FX25_NROOTS)
{
if (lambda[i] == 0)
b[i] = FX25_A0;
else
b[i] = MODNN(FX25_INDEX_OF[lambda[i]] - discr_r + FX25_NN);
i++;
}
}
else
{
move(&b[0], &b[1], FX25_NROOTS);
b[0] = FX25_A0;
}
move(t, lambda, FX25_NROOTS + 1);
}
r++;
}
deg_lambda = 0;
i = 0;
while (i < FX25_NROOTS + 1)
{
lambda[i] = FX25_INDEX_OF[lambda[i]];
if (lambda[i] != FX25_A0)
deg_lambda = i;
i++;
}
move(&lambda[1], &reg[1], FX25_NROOTS);
count = 0;
i = 1;
k = FX25_IPRIM - 1;
while (i <= FX25_NN)
{
q = 1;
j = deg_lambda;
while (j > 0)
{
if (reg[j] != FX25_A0)
{
reg[j] = MODNN(reg[j] + j);
q = q ^ FX25_ALPHA_TO[reg[j]];
}
j--;
}
if (q == 0)
{
root[count] = i;
loc[count] = k;
count++;
if (count == deg_lambda)
break;
}
i++;
k = MODNN(k + FX25_IPRIM);
}
if (deg_lambda != count)
return -1;
deg_omega = deg_lambda - 1;
i = 0;
while (i <= deg_omega)
{
tmp = 0;
j = i;
while (j >= 0)
{
if (s[i - j] != FX25_A0 && lambda[j] != FX25_A0)
tmp = tmp ^ FX25_ALPHA_TO[MODNN(s[i - j] + lambda[j])];
j--;
}
omega[i] = FX25_INDEX_OF[tmp];
i++;
}
j = count - 1;
while (j >= 0)
{
num1 = 0;
i = deg_omega;
while (i >= 0)
{
if (omega[i] != FX25_A0)
num1 = num1 ^ FX25_ALPHA_TO[MODNN(omega[i] + i * root[j])];
i--;
}
num2 = FX25_ALPHA_TO[MODNN(root[j] * (FX25_FCR - 1) + FX25_NN)];
den = 0;
i = FX25_MIN(deg_lambda, FX25_NROOTS - 1) & 0xFE;
while (i >= 0)
{
if (lambda[i + 1] != FX25_A0)
den = den ^ FX25_ALPHA_TO[MODNN(lambda[i + 1] + i * root[j])];
i = i - 2;
}
if (num1 != 0 && loc[j] >= pad)
data[loc[j] - pad] = data[loc[j] - pad] ^ FX25_ALPHA_TO[MODNN(FX25_INDEX_OF[num1] + FX25_INDEX_OF[num2] + FX25_NN - FX25_INDEX_OF[den])];
j--;
}
return count;
}
void fx25_encode_rs(Byte * data, Byte *parity, int pad, int rs_size)
{
switch (rs_size)
{
case 8:
move(&FX25_CCSDS_poly_8[0], &FX25_GENPOLY[0], 9);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
case 16:
move(&FX25_CCSDS_poly_16[0], &FX25_GENPOLY[0], 17);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
case 32:
move(&FX25_CCSDS_poly_32[0], &FX25_GENPOLY[0], 33);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
case 64:
move(&FX25_CCSDS_poly_64[0], &FX25_GENPOLY[0], 65);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
}
}
int fx25_decode_rs(Byte * data, int * eras_pos, int no_eras, int pad, int rs_size)
{
switch (rs_size)
{
case 8:
move(&FX25_CCSDS_poly_8[0], &FX25_GENPOLY[0], 9);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
case 16:
move(&FX25_CCSDS_poly_16[0], &FX25_GENPOLY[0], 17);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
case 32:
move(&FX25_CCSDS_poly_32[0], &FX25_GENPOLY[0], 33);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
case 64:
move(&FX25_CCSDS_poly_64[0], &FX25_GENPOLY[0], 65);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
default:
return -1;
}
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
//void fx25_encode_rs(byte * data, byte * parity, int pad, int rs_size);
//int fx25_decode_rs(byte * data, int * eras_pos, int no_eras, int pad, int rs_size);
#define FX25_FCR 1
#define FX25_PRIM 1
#define FX25_IPRIM 1
#define FX25_MM 8
#define FX25_NN 255
#define FX25_A0 FX25_NN
Byte FX25_ALPHA_TO[256] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,
0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,
0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,
0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,
0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,
0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,
0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,
0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,
0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,
0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,
0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,
0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,
0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,
0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,
0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,
0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00
};
Byte FX25_INDEX_OF[256] = {
255, 0, 1, 25, 2, 50, 26,198, 3,223, 51,238, 27,104,199, 75,
4,100,224, 14, 52,141,239,129, 28,193,105,248,200, 8, 76,113,
5,138,101, 47,225, 36, 15, 33, 53,147,142,218,240, 18,130, 69,
29,181,194,125,106, 39,249,185,201,154, 9,120, 77,228,114,166,
6,191,139, 98,102,221, 48,253,226,152, 37,179, 16,145, 34,136,
54,208,148,206,143,150,219,189,241,210, 19, 92,131, 56, 70, 64,
30, 66,182,163,195, 72,126,110,107, 58, 40, 84,250,133,186, 61,
202, 94,155,159, 10, 21,121, 43, 78,212,229,172,115,243,167, 87,
7,112,192,247,140,128, 99, 13,103, 74,222,237, 49,197,254, 24,
227,165,153,119, 38,184,180,124, 17, 68,146,217, 35, 32,137, 46,
55, 63,209, 91,149,188,207,205,144,135,151,178,220,252,190, 97,
242, 86,211,171, 20, 42, 93,158,132, 60, 57, 83, 71,109, 65,162,
31, 45, 67,216,183,123,164,118,196, 23, 73,236,127, 12,111,246,
108,161, 59, 82, 41,157, 85,170,251, 96,134,177,187,204, 62, 90,
203, 89, 95,176,156,169,160, 81, 11,245, 22,235,122,117, 44,215,
79,174,213,233,230,231,173,232,116,214,244,234,168, 80, 88,175
};
Byte FX25_CCSDS_poly_8[9] =
{ 29, 188, 142, 221, 118, 206, 52, 168, 0 };
Byte FX25_CCSDS_poly_16[17] =
{136,240,208,195,181,158,201,100, 11, 83,167,107,113,110,106,121, 0 };
Byte FX25_CCSDS_poly_32[33] = {
18,251,215, 28, 80,107,248, 53, 84,194, 91, 59,176, 99,203,137,
43,104,137, 0, 44,149,148,218, 75, 11,173,254,194,109, 8, 11,
0 };
Byte FX25_CCSDS_poly_64[65] = {
40, 21,218, 23, 48,237, 69, 6, 87, 42, 29,193,160,150,113, 32,
35,172,241,240,184, 90,188,225, 87,130,254, 41,245,253,184,241,
188,176, 54, 58,240,226,119,185, 77,150, 48,140,169,160, 96,217,
15,202,218,190,135,103,129, 77, 57,166,164, 12, 13,178, 53, 46,
0 };
integer FX25_NROOTS ;
Byte FX25_GENPOLY[256];
Byte MODNN(int x)
{
return x % 255;
}
void encode_rs(Byte * data, Byte * parity, int pad)
{
int i, j;
Byte feedback;
memset(parity, 0, FX25_NROOTS);
i = 0;
while (i < FX25_NN - FX25_NROOTS - pad)
{
feedback = FX25_INDEX_OF[data[i] ^ parity[0]];
if (feedback != FX25_A0)
{
j = 1;
while (j < FX25_NROOTS)
{
parity[j] = parity[j] ^ FX25_ALPHA_TO[MODNN(feedback + FX25_GENPOLY[FX25_NROOTS - j])];
j++;
}
}
move(&parity[1], &parity[0], FX25_NROOTS - 1);
if (feedback != FX25_A0)
parity[FX25_NROOTS - 1] = FX25_ALPHA_TO[MODNN(feedback + FX25_GENPOLY[0])];
else
parity[FX25_NROOTS - 1] = 0;
i++;
}
}
int FX25_MIN(int a, int b)
{
if (a > b)
return b;
else
return a;
}
int decode_rs(Byte * data, int * eras_pos, int no_eras, int pad)
{
int deg_lambda, el, deg_omega;
int i, j, r, k;
Byte q, tmp, num1, num2, den, discr_r;
Byte s[256];
Byte lambda[256];
Byte b[256];
Byte t[256];
Byte omega[256];
Byte root[256];
Byte reg[256];
Byte loc[256];
int syn_error, count = 0;
if (pad < 0 || pad>238)
return -1;
i = 0;
while (i < FX25_NROOTS)
{
s[i] = data[0];
i++;
}
j = 1;
while (j < FX25_NN - pad)
{
i = 0;
while (i < FX25_NROOTS)
{
if (s[i] == 0)
s[i] = data[j];
else
s[i] = data[j] ^ FX25_ALPHA_TO[MODNN(FX25_INDEX_OF[s[i]] + (FX25_FCR + i)*FX25_PRIM)];
i++;
}
j++;
}
syn_error = 0;
i = 0;
while (i < FX25_NROOTS)
{
syn_error = syn_error | s[i];
s[i] = FX25_INDEX_OF[s[i]];
i++;
}
if (syn_error == 0)
return count;
memset(&lambda[1], 0, FX25_NROOTS);
lambda[0] = 1;
i = 0;
while (i < FX25_NROOTS + 1)
{
b[i] = FX25_INDEX_OF[lambda[i]];
i++;
}
r = no_eras;
el = no_eras;
r++;
while (r <= FX25_NROOTS)
{
discr_r = 0;
i = 0;
while (i < r)
{
if (lambda[i] != 0 && s[r - i - 1] != FX25_A0)
discr_r = discr_r ^ FX25_ALPHA_TO[MODNN(FX25_INDEX_OF[lambda[i]] + s[r - i - 1])];
i++;
}
discr_r = FX25_INDEX_OF[discr_r];
if (discr_r == FX25_A0)
{
move(&b[0], &b[1], FX25_NROOTS);
b[0] = FX25_A0;
}
else
{
t[0] = lambda[0];
i = 0;
while (i < FX25_NROOTS)
{
if (b[i] != FX25_A0)
t[i + 1] = lambda[i + 1] ^ FX25_ALPHA_TO[MODNN(discr_r + b[i])];
else
t[i + 1] = lambda[i + 1];
i++;
}
if (2 * el <= r + no_eras - 1)
{
el = r + no_eras - el;
i = 0;
while (i <= FX25_NROOTS)
{
if (lambda[i] == 0)
b[i] = FX25_A0;
else
b[i] = MODNN(FX25_INDEX_OF[lambda[i]] - discr_r + FX25_NN);
i++;
}
}
else
{
move(&b[0], &b[1], FX25_NROOTS);
b[0] = FX25_A0;
}
move(t, lambda, FX25_NROOTS + 1);
}
r++;
}
deg_lambda = 0;
i = 0;
while (i < FX25_NROOTS + 1)
{
lambda[i] = FX25_INDEX_OF[lambda[i]];
if (lambda[i] != FX25_A0)
deg_lambda = i;
i++;
}
move(&lambda[1], &reg[1], FX25_NROOTS);
count = 0;
i = 1;
k = FX25_IPRIM - 1;
while (i <= FX25_NN)
{
q = 1;
j = deg_lambda;
while (j > 0)
{
if (reg[j] != FX25_A0)
{
reg[j] = MODNN(reg[j] + j);
q = q ^ FX25_ALPHA_TO[reg[j]];
}
j--;
}
if (q == 0)
{
root[count] = i;
loc[count] = k;
count++;
if (count == deg_lambda)
break;
}
i++;
k = MODNN(k + FX25_IPRIM);
}
if (deg_lambda != count)
return -1;
deg_omega = deg_lambda - 1;
i = 0;
while (i <= deg_omega)
{
tmp = 0;
j = i;
while (j >= 0)
{
if (s[i - j] != FX25_A0 && lambda[j] != FX25_A0)
tmp = tmp ^ FX25_ALPHA_TO[MODNN(s[i - j] + lambda[j])];
j--;
}
omega[i] = FX25_INDEX_OF[tmp];
i++;
}
j = count - 1;
while (j >= 0)
{
num1 = 0;
i = deg_omega;
while (i >= 0)
{
if (omega[i] != FX25_A0)
num1 = num1 ^ FX25_ALPHA_TO[MODNN(omega[i] + i * root[j])];
i--;
}
num2 = FX25_ALPHA_TO[MODNN(root[j] * (FX25_FCR - 1) + FX25_NN)];
den = 0;
i = FX25_MIN(deg_lambda, FX25_NROOTS - 1) & 0xFE;
while (i >= 0)
{
if (lambda[i + 1] != FX25_A0)
den = den ^ FX25_ALPHA_TO[MODNN(lambda[i + 1] + i * root[j])];
i = i - 2;
}
if (num1 != 0 && loc[j] >= pad)
data[loc[j] - pad] = data[loc[j] - pad] ^ FX25_ALPHA_TO[MODNN(FX25_INDEX_OF[num1] + FX25_INDEX_OF[num2] + FX25_NN - FX25_INDEX_OF[den])];
j--;
}
return count;
}
void fx25_encode_rs(Byte * data, Byte *parity, int pad, int rs_size)
{
switch (rs_size)
{
case 8:
move(&FX25_CCSDS_poly_8[0], &FX25_GENPOLY[0], 9);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
case 16:
move(&FX25_CCSDS_poly_16[0], &FX25_GENPOLY[0], 17);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
case 32:
move(&FX25_CCSDS_poly_32[0], &FX25_GENPOLY[0], 33);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
case 64:
move(&FX25_CCSDS_poly_64[0], &FX25_GENPOLY[0], 65);
FX25_NROOTS = rs_size;
encode_rs(data, parity, 0);
return;
}
}
int fx25_decode_rs(Byte * data, int * eras_pos, int no_eras, int pad, int rs_size)
{
switch (rs_size)
{
case 8:
move(&FX25_CCSDS_poly_8[0], &FX25_GENPOLY[0], 9);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
case 16:
move(&FX25_CCSDS_poly_16[0], &FX25_GENPOLY[0], 17);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
case 32:
move(&FX25_CCSDS_poly_32[0], &FX25_GENPOLY[0], 33);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
case 64:
move(&FX25_CCSDS_poly_64[0], &FX25_GENPOLY[0], 65);
FX25_NROOTS = rs_size;
return decode_rs(data, eras_pos, no_eras, pad);
default:
return -1;
}
}

3248
ax25_l2.c

File diff suppressed because it is too large Load diff

3486
ax25_mod.c

File diff suppressed because it is too large Load diff

View file

@ -1,285 +1,285 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>calDialog</class>
<widget class="QDialog" name="calDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>270</width>
<height>411</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QGroupBox" name="groupBoxA">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel A</string>
</property>
<widget class="QPushButton" name="Low_A">
<property name="geometry">
<rect>
<x>26</x>
<y>26</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="High_A">
<property name="geometry">
<rect>
<x>26</x>
<y>66</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_A">
<property name="geometry">
<rect>
<x>26</x>
<y>106</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_A">
<property name="geometry">
<rect>
<x>26</x>
<y>146</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBoxB">
<property name="geometry">
<rect>
<x>140</x>
<y>10</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel B</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<widget class="QPushButton" name="Low_B">
<property name="geometry">
<rect>
<x>26</x>
<y>26</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="High_B">
<property name="geometry">
<rect>
<x>26</x>
<y>66</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_B">
<property name="geometry">
<rect>
<x>26</x>
<y>106</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_B">
<property name="geometry">
<rect>
<x>28</x>
<y>146</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>210</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel C</string>
</property>
<widget class="QPushButton" name="High_C">
<property name="geometry">
<rect>
<x>26</x>
<y>70</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_C">
<property name="geometry">
<rect>
<x>26</x>
<y>110</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Low_C">
<property name="geometry">
<rect>
<x>26</x>
<y>30</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_C">
<property name="geometry">
<rect>
<x>26</x>
<y>150</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>140</x>
<y>210</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel D</string>
</property>
<widget class="QPushButton" name="High_D">
<property name="geometry">
<rect>
<x>26</x>
<y>70</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_D">
<property name="geometry">
<rect>
<x>25</x>
<y>110</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Low_D">
<property name="geometry">
<rect>
<x>26</x>
<y>30</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_D">
<property name="geometry">
<rect>
<x>26</x>
<y>150</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
<slots>
<slot>buttonClick()</slot>
</slots>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>calDialog</class>
<widget class="QDialog" name="calDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>270</width>
<height>411</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QGroupBox" name="groupBoxA">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel A</string>
</property>
<widget class="QPushButton" name="Low_A">
<property name="geometry">
<rect>
<x>26</x>
<y>26</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="High_A">
<property name="geometry">
<rect>
<x>26</x>
<y>66</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_A">
<property name="geometry">
<rect>
<x>26</x>
<y>106</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_A">
<property name="geometry">
<rect>
<x>26</x>
<y>146</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBoxB">
<property name="geometry">
<rect>
<x>140</x>
<y>10</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel B</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<widget class="QPushButton" name="Low_B">
<property name="geometry">
<rect>
<x>26</x>
<y>26</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="High_B">
<property name="geometry">
<rect>
<x>26</x>
<y>66</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_B">
<property name="geometry">
<rect>
<x>26</x>
<y>106</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_B">
<property name="geometry">
<rect>
<x>28</x>
<y>146</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>210</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel C</string>
</property>
<widget class="QPushButton" name="High_C">
<property name="geometry">
<rect>
<x>26</x>
<y>70</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_C">
<property name="geometry">
<rect>
<x>26</x>
<y>110</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Low_C">
<property name="geometry">
<rect>
<x>26</x>
<y>30</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_C">
<property name="geometry">
<rect>
<x>26</x>
<y>150</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>140</x>
<y>210</y>
<width>120</width>
<height>195</height>
</rect>
</property>
<property name="title">
<string>Channel D</string>
</property>
<widget class="QPushButton" name="High_D">
<property name="geometry">
<rect>
<x>26</x>
<y>70</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>High Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Both_D">
<property name="geometry">
<rect>
<x>25</x>
<y>110</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Both Tones</string>
</property>
</widget>
<widget class="QPushButton" name="Low_D">
<property name="geometry">
<rect>
<x>26</x>
<y>30</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Low Tone</string>
</property>
</widget>
<widget class="QPushButton" name="Stop_D">
<property name="geometry">
<rect>
<x>26</x>
<y>150</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Stop TX</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
<slots>
<slot>buttonClick()</slot>
</slots>
</ui>

188
debug/QtSoundModem.ini Normal file
View file

@ -0,0 +1,188 @@
[General]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\x9e\0\0\0\x64\0\0\x4\x61\0\0\x3T\0\0\0\x9f\0\0\0\x83\0\0\x4`\0\0\x3S\0\0\0\0\0\0\0\0\x5\0\0\0\0\x9f\0\0\0\x83\0\0\x4`\0\0\x3S)
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\xc2\0\0\x2\xbc\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
[AX25_A]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
MEMRecovery=200
IPOLL=80
MyDigiCall=
FX25=1
IL2P=0
RSID_UI=0
RSID_SABM=0
RSID_SetModem=0
[Init]
SoundMode=0
UDPClientPort=8888
UDPServerPort=8884
TXPort=8884
UDPServer=0
UDPHost=192.168.1.255
TXSampleRate=12000
RXSampleRate=12000
SndRXDeviceName="HW:1,0"
SndTXDeviceName="HW:1,0"
SCO=0
DualPTT=1
TXRotate=0
DispMode=1
PTT=
PTTBAUD=19200
PTTMode=19200
PTTOffString=
PTTOnString=
pttGPIOPin=17
pttGPIOPinR=17
CM108Addr=0xD8C:0x08
HamLibPort=4532
HamLibHost=127.0.0.1
MinimizetoTray=1
multiCore=0
[AX25_B]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
MEMRecovery=200
IPOLL=80
MyDigiCall=
FX25=1
IL2P=0
RSID_UI=0
RSID_SABM=0
RSID_SetModem=0
[Modem]
NRRcvrPairs1=0
NRRcvrPairs2=0
NRRcvrPairs3=0
NRRcvrPairs4=0
RcvrShift1=30
RcvrShift2=30
RcvrShift3=30
RcvrShift4=30
ModemType1=1
ModemType2=1
ModemType3=1
ModemType4=1
soundChannel1=1
soundChannel2=0
soundChannel3=0
soundChannel4=0
DCDThreshold=40
rxOffset=0
PreEmphasisAll1=0
PreEmphasisAll2=0
PreEmphasisAll3=0
PreEmphasisAll4=0
PreEmphasisDB1=0
PreEmphasisDB2=0
PreEmphasisDB3=0
PreEmphasisDB4=0
TxDelay1=250
TxDelay2=250
TxDelay3=250
TxDelay4=250
TxTail1=50
TxTail2=50
TxTail3=50
TxTail4=50
CWIDCall=
CWIDInterval=0
CWIDLeft=0
CWIDRight=0
CWIDType=1
[AGWHost]
Server=1
Port=8000
[KISS]
Server=0
Port=8105
[AX25_C]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
MEMRecovery=200
IPOLL=80
MyDigiCall=
FX25=1
IL2P=0
RSID_UI=0
RSID_SABM=0
RSID_SetModem=0
[Window]
Waterfall1=1
Waterfall2=1
[AX25_D]
Retries=15
HiToneRaise=0
Maxframe=3
FrackTime=5
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
NonAX25Frm=0
MEMRecovery=200
IPOLL=80
MyDigiCall=
FX25=1
IL2P=0
RSID_UI=0
RSID_SABM=0
RSID_SetModem=0

12
debug/moc_predefs.h Normal file
View file

@ -0,0 +1,12 @@
#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 _DEBUG
#define _MT
#define _DLL

File diff suppressed because it is too large Load diff

144
fftw3.f
View file

@ -1,72 +1,72 @@
INTEGER FFTW_R2HC
PARAMETER (FFTW_R2HC=0)
INTEGER FFTW_HC2R
PARAMETER (FFTW_HC2R=1)
INTEGER FFTW_DHT
PARAMETER (FFTW_DHT=2)
INTEGER FFTW_REDFT00
PARAMETER (FFTW_REDFT00=3)
INTEGER FFTW_REDFT01
PARAMETER (FFTW_REDFT01=4)
INTEGER FFTW_REDFT10
PARAMETER (FFTW_REDFT10=5)
INTEGER FFTW_REDFT11
PARAMETER (FFTW_REDFT11=6)
INTEGER FFTW_RODFT00
PARAMETER (FFTW_RODFT00=7)
INTEGER FFTW_RODFT01
PARAMETER (FFTW_RODFT01=8)
INTEGER FFTW_RODFT10
PARAMETER (FFTW_RODFT10=9)
INTEGER FFTW_RODFT11
PARAMETER (FFTW_RODFT11=10)
INTEGER FFTW_FORWARD
PARAMETER (FFTW_FORWARD=-1)
INTEGER FFTW_BACKWARD
PARAMETER (FFTW_BACKWARD=+1)
INTEGER FFTW_MEASURE
PARAMETER (FFTW_MEASURE=0)
INTEGER FFTW_DESTROY_INPUT
PARAMETER (FFTW_DESTROY_INPUT=1)
INTEGER FFTW_UNALIGNED
PARAMETER (FFTW_UNALIGNED=2)
INTEGER FFTW_CONSERVE_MEMORY
PARAMETER (FFTW_CONSERVE_MEMORY=4)
INTEGER FFTW_EXHAUSTIVE
PARAMETER (FFTW_EXHAUSTIVE=8)
INTEGER FFTW_PRESERVE_INPUT
PARAMETER (FFTW_PRESERVE_INPUT=16)
INTEGER FFTW_PATIENT
PARAMETER (FFTW_PATIENT=32)
INTEGER FFTW_ESTIMATE
PARAMETER (FFTW_ESTIMATE=64)
INTEGER FFTW_WISDOM_ONLY
PARAMETER (FFTW_WISDOM_ONLY=2097152)
INTEGER FFTW_ESTIMATE_PATIENT
PARAMETER (FFTW_ESTIMATE_PATIENT=128)
INTEGER FFTW_BELIEVE_PCOST
PARAMETER (FFTW_BELIEVE_PCOST=256)
INTEGER FFTW_NO_DFT_R2HC
PARAMETER (FFTW_NO_DFT_R2HC=512)
INTEGER FFTW_NO_NONTHREADED
PARAMETER (FFTW_NO_NONTHREADED=1024)
INTEGER FFTW_NO_BUFFERING
PARAMETER (FFTW_NO_BUFFERING=2048)
INTEGER FFTW_NO_INDIRECT_OP
PARAMETER (FFTW_NO_INDIRECT_OP=4096)
INTEGER FFTW_ALLOW_LARGE_GENERIC
PARAMETER (FFTW_ALLOW_LARGE_GENERIC=8192)
INTEGER FFTW_NO_RANK_SPLITS
PARAMETER (FFTW_NO_RANK_SPLITS=16384)
INTEGER FFTW_NO_VRANK_SPLITS
PARAMETER (FFTW_NO_VRANK_SPLITS=32768)
INTEGER FFTW_NO_VRECURSE
PARAMETER (FFTW_NO_VRECURSE=65536)
INTEGER FFTW_NO_SIMD
PARAMETER (FFTW_NO_SIMD=131072)
INTEGER FFTW_NO_SLOW
PARAMETER (FFTW_NO_SLOW=262144)
INTEGER FFTW_NO_FIXED_RADIX_LARGE_N
PARAMETER (FFTW_NO_FIXED_RADIX_LARGE_N=524288)
INTEGER FFTW_ALLOW_PRUNING
PARAMETER (FFTW_ALLOW_PRUNING=1048576)
INTEGER FFTW_R2HC
PARAMETER (FFTW_R2HC=0)
INTEGER FFTW_HC2R
PARAMETER (FFTW_HC2R=1)
INTEGER FFTW_DHT
PARAMETER (FFTW_DHT=2)
INTEGER FFTW_REDFT00
PARAMETER (FFTW_REDFT00=3)
INTEGER FFTW_REDFT01
PARAMETER (FFTW_REDFT01=4)
INTEGER FFTW_REDFT10
PARAMETER (FFTW_REDFT10=5)
INTEGER FFTW_REDFT11
PARAMETER (FFTW_REDFT11=6)
INTEGER FFTW_RODFT00
PARAMETER (FFTW_RODFT00=7)
INTEGER FFTW_RODFT01
PARAMETER (FFTW_RODFT01=8)
INTEGER FFTW_RODFT10
PARAMETER (FFTW_RODFT10=9)
INTEGER FFTW_RODFT11
PARAMETER (FFTW_RODFT11=10)
INTEGER FFTW_FORWARD
PARAMETER (FFTW_FORWARD=-1)
INTEGER FFTW_BACKWARD
PARAMETER (FFTW_BACKWARD=+1)
INTEGER FFTW_MEASURE
PARAMETER (FFTW_MEASURE=0)
INTEGER FFTW_DESTROY_INPUT
PARAMETER (FFTW_DESTROY_INPUT=1)
INTEGER FFTW_UNALIGNED
PARAMETER (FFTW_UNALIGNED=2)
INTEGER FFTW_CONSERVE_MEMORY
PARAMETER (FFTW_CONSERVE_MEMORY=4)
INTEGER FFTW_EXHAUSTIVE
PARAMETER (FFTW_EXHAUSTIVE=8)
INTEGER FFTW_PRESERVE_INPUT
PARAMETER (FFTW_PRESERVE_INPUT=16)
INTEGER FFTW_PATIENT
PARAMETER (FFTW_PATIENT=32)
INTEGER FFTW_ESTIMATE
PARAMETER (FFTW_ESTIMATE=64)
INTEGER FFTW_WISDOM_ONLY
PARAMETER (FFTW_WISDOM_ONLY=2097152)
INTEGER FFTW_ESTIMATE_PATIENT
PARAMETER (FFTW_ESTIMATE_PATIENT=128)
INTEGER FFTW_BELIEVE_PCOST
PARAMETER (FFTW_BELIEVE_PCOST=256)
INTEGER FFTW_NO_DFT_R2HC
PARAMETER (FFTW_NO_DFT_R2HC=512)
INTEGER FFTW_NO_NONTHREADED
PARAMETER (FFTW_NO_NONTHREADED=1024)
INTEGER FFTW_NO_BUFFERING
PARAMETER (FFTW_NO_BUFFERING=2048)
INTEGER FFTW_NO_INDIRECT_OP
PARAMETER (FFTW_NO_INDIRECT_OP=4096)
INTEGER FFTW_ALLOW_LARGE_GENERIC
PARAMETER (FFTW_ALLOW_LARGE_GENERIC=8192)
INTEGER FFTW_NO_RANK_SPLITS
PARAMETER (FFTW_NO_RANK_SPLITS=16384)
INTEGER FFTW_NO_VRANK_SPLITS
PARAMETER (FFTW_NO_VRANK_SPLITS=32768)
INTEGER FFTW_NO_VRECURSE
PARAMETER (FFTW_NO_VRECURSE=65536)
INTEGER FFTW_NO_SIMD
PARAMETER (FFTW_NO_SIMD=131072)
INTEGER FFTW_NO_SLOW
PARAMETER (FFTW_NO_SLOW=262144)
INTEGER FFTW_NO_FIXED_RADIX_LARGE_N
PARAMETER (FFTW_NO_FIXED_RADIX_LARGE_N=524288)
INTEGER FFTW_ALLOW_PRUNING
PARAMETER (FFTW_ALLOW_PRUNING=1048576)

830
fftw3.h
View file

@ -1,415 +1,415 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/***************************** NOTE TO USERS *********************************
*
* THIS IS A HEADER FILE, NOT A MANUAL
*
* If you want to know how to use FFTW, please read the manual,
* online at http://www.fftw.org/doc/ and also included with FFTW.
* For a quick start, see the manual's tutorial section.
*
* (Reading header files to learn how to use a library is a habit
* stemming from code lacking a proper manual. Arguably, it's a
* *bad* habit in most cases, because header files can contain
* interfaces that are not part of the public, stable API.)
*
****************************************************************************/
#ifndef FFTW3_H
#define FFTW3_H
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/* If <complex.h> is included, use the C99 complex type. Otherwise
define a type bit-compatible with C99 complex */
#if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
# define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
#else
# define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
#endif
#define FFTW_CONCAT(prefix, name) prefix ## name
#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
#define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
/* IMPORTANT: for Windows compilers, you should add a line
*/
//#define FFTW_DLL
/*
here and in kernel/ifftw.h if you are compiling/using FFTW as a
DLL, in order to do the proper importing/exporting, or
alternatively compile with -DFFTW_DLL or the equivalent
command-line flag. This is not necessary under MinGW/Cygwin, where
libtool does the imports/exports automatically. */
#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
/* annoying Windows syntax for shared-library declarations */
# if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */
# define FFTW_EXTERN extern __declspec(dllexport)
# else /* user is calling FFTW; import symbol */
# define FFTW_EXTERN extern __declspec(dllimport)
# endif
#else
# define FFTW_EXTERN extern
#endif
enum fftw_r2r_kind_do_not_use_me {
FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
};
struct fftw_iodim_do_not_use_me {
int n; /* dimension size */
int is; /* input stride */
int os; /* output stride */
};
#include <stddef.h> /* for ptrdiff_t */
struct fftw_iodim64_do_not_use_me {
ptrdiff_t n; /* dimension size */
ptrdiff_t is; /* input stride */
ptrdiff_t os; /* output stride */
};
typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *);
typedef int (*fftw_read_char_func_do_not_use_me)(void *);
/*
huge second-order macro that defines prototypes for all API
functions. We expand this macro for each supported precision
X: name-mangling macro
R: real data type
C: complex data type
*/
#define FFTW_DEFINE_API(X, R, C) \
\
FFTW_DEFINE_COMPLEX(R, C); \
\
typedef struct X(plan_s) *X(plan); \
\
typedef struct fftw_iodim_do_not_use_me X(iodim); \
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
\
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
\
typedef fftw_write_char_func_do_not_use_me X(write_char_func); \
typedef fftw_read_char_func_do_not_use_me X(read_char_func); \
\
FFTW_EXTERN void X(execute)(const X(plan) p); \
\
FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \
C *in, C *out, int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \
FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \
R *ro, R *io); \
\
FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \
R *in, C *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \
int n2, \
R *in, C *out, unsigned flags); \
\
\
FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \
C *in, R *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \
int n2, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \
FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \
\
FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \
R *in, R *ro, R *io); \
FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \
R *ri, R *ii, R *out); \
\
FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \
X(r2r_kind) kind, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \
X(r2r_kind) kind0, X(r2r_kind) kind1, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \
R *in, R *out, X(r2r_kind) kind0, \
X(r2r_kind) kind1, X(r2r_kind) kind2, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \
\
FFTW_EXTERN void X(destroy_plan)(X(plan) p); \
FFTW_EXTERN void X(forget_wisdom)(void); \
FFTW_EXTERN void X(cleanup)(void); \
\
FFTW_EXTERN void X(set_timelimit)(double t); \
\
FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \
FFTW_EXTERN int X(init_threads)(void); \
FFTW_EXTERN void X(cleanup_threads)(void); \
FFTW_EXTERN void X(make_planner_thread_safe)(void); \
\
FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \
FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \
FFTW_EXTERN char *X(export_wisdom_to_string)(void); \
FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, \
void *data); \
FFTW_EXTERN int X(import_system_wisdom)(void); \
FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \
FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \
FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \
FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \
\
FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \
FFTW_EXTERN void X(print_plan)(const X(plan) p); \
FFTW_EXTERN char *X(sprint_plan)(const X(plan) p); \
\
FFTW_EXTERN void *X(malloc)(size_t n); \
FFTW_EXTERN R *X(alloc_real)(size_t n); \
FFTW_EXTERN C *X(alloc_complex)(size_t n); \
FFTW_EXTERN void X(free)(void *p); \
\
FFTW_EXTERN void X(flops)(const X(plan) p, \
double *add, double *mul, double *fmas); \
FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \
FFTW_EXTERN double X(cost)(const X(plan) p); \
\
FFTW_EXTERN int X(alignment_of)(R *p); \
FFTW_EXTERN const char X(version)[]; \
FFTW_EXTERN const char X(cc)[]; \
FFTW_EXTERN const char X(codelet_optim)[];
/* end of FFTW_DEFINE_API macro */
FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
&& !(defined(__ICC) || defined(__INTEL_COMPILER) || defined(__CUDACC__) || defined(__PGI)) \
&& (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
# if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
/* note: __float128 is a typedef, which is not supported with the _Complex
keyword in gcc, so instead we use this ugly __attribute__ version.
However, we can't simply pass the __attribute__ version to
FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */
# undef FFTW_DEFINE_COMPLEX
# define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C
# endif
FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
#endif
#define FFTW_FORWARD (-1)
#define FFTW_BACKWARD (+1)
#define FFTW_NO_TIMELIMIT (-1.0)
/* documented flags */
#define FFTW_MEASURE (0U)
#define FFTW_DESTROY_INPUT (1U << 0)
#define FFTW_UNALIGNED (1U << 1)
#define FFTW_CONSERVE_MEMORY (1U << 2)
#define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */
#define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */
#define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */
#define FFTW_ESTIMATE (1U << 6)
#define FFTW_WISDOM_ONLY (1U << 21)
/* undocumented beyond-guru flags */
#define FFTW_ESTIMATE_PATIENT (1U << 7)
#define FFTW_BELIEVE_PCOST (1U << 8)
#define FFTW_NO_DFT_R2HC (1U << 9)
#define FFTW_NO_NONTHREADED (1U << 10)
#define FFTW_NO_BUFFERING (1U << 11)
#define FFTW_NO_INDIRECT_OP (1U << 12)
#define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */
#define FFTW_NO_RANK_SPLITS (1U << 14)
#define FFTW_NO_VRANK_SPLITS (1U << 15)
#define FFTW_NO_VRECURSE (1U << 16)
#define FFTW_NO_SIMD (1U << 17)
#define FFTW_NO_SLOW (1U << 18)
#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19)
#define FFTW_ALLOW_PRUNING (1U << 20)
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* FFTW3_H */
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/***************************** NOTE TO USERS *********************************
*
* THIS IS A HEADER FILE, NOT A MANUAL
*
* If you want to know how to use FFTW, please read the manual,
* online at http://www.fftw.org/doc/ and also included with FFTW.
* For a quick start, see the manual's tutorial section.
*
* (Reading header files to learn how to use a library is a habit
* stemming from code lacking a proper manual. Arguably, it's a
* *bad* habit in most cases, because header files can contain
* interfaces that are not part of the public, stable API.)
*
****************************************************************************/
#ifndef FFTW3_H
#define FFTW3_H
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/* If <complex.h> is included, use the C99 complex type. Otherwise
define a type bit-compatible with C99 complex */
#if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
# define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
#else
# define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
#endif
#define FFTW_CONCAT(prefix, name) prefix ## name
#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
#define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
/* IMPORTANT: for Windows compilers, you should add a line
*/
//#define FFTW_DLL
/*
here and in kernel/ifftw.h if you are compiling/using FFTW as a
DLL, in order to do the proper importing/exporting, or
alternatively compile with -DFFTW_DLL or the equivalent
command-line flag. This is not necessary under MinGW/Cygwin, where
libtool does the imports/exports automatically. */
#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
/* annoying Windows syntax for shared-library declarations */
# if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */
# define FFTW_EXTERN extern __declspec(dllexport)
# else /* user is calling FFTW; import symbol */
# define FFTW_EXTERN extern __declspec(dllimport)
# endif
#else
# define FFTW_EXTERN extern
#endif
enum fftw_r2r_kind_do_not_use_me {
FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
};
struct fftw_iodim_do_not_use_me {
int n; /* dimension size */
int is; /* input stride */
int os; /* output stride */
};
#include <stddef.h> /* for ptrdiff_t */
struct fftw_iodim64_do_not_use_me {
ptrdiff_t n; /* dimension size */
ptrdiff_t is; /* input stride */
ptrdiff_t os; /* output stride */
};
typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *);
typedef int (*fftw_read_char_func_do_not_use_me)(void *);
/*
huge second-order macro that defines prototypes for all API
functions. We expand this macro for each supported precision
X: name-mangling macro
R: real data type
C: complex data type
*/
#define FFTW_DEFINE_API(X, R, C) \
\
FFTW_DEFINE_COMPLEX(R, C); \
\
typedef struct X(plan_s) *X(plan); \
\
typedef struct fftw_iodim_do_not_use_me X(iodim); \
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
\
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
\
typedef fftw_write_char_func_do_not_use_me X(write_char_func); \
typedef fftw_read_char_func_do_not_use_me X(read_char_func); \
\
FFTW_EXTERN void X(execute)(const X(plan) p); \
\
FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \
C *in, C *out, int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \
FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \
R *ro, R *io); \
\
FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \
R *in, C *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \
int n2, \
R *in, C *out, unsigned flags); \
\
\
FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \
C *in, R *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \
int n2, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \
FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \
\
FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \
R *in, R *ro, R *io); \
FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \
R *ri, R *ii, R *out); \
\
FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \
X(r2r_kind) kind, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \
X(r2r_kind) kind0, X(r2r_kind) kind1, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \
R *in, R *out, X(r2r_kind) kind0, \
X(r2r_kind) kind1, X(r2r_kind) kind2, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \
\
FFTW_EXTERN void X(destroy_plan)(X(plan) p); \
FFTW_EXTERN void X(forget_wisdom)(void); \
FFTW_EXTERN void X(cleanup)(void); \
\
FFTW_EXTERN void X(set_timelimit)(double t); \
\
FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \
FFTW_EXTERN int X(init_threads)(void); \
FFTW_EXTERN void X(cleanup_threads)(void); \
FFTW_EXTERN void X(make_planner_thread_safe)(void); \
\
FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \
FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \
FFTW_EXTERN char *X(export_wisdom_to_string)(void); \
FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, \
void *data); \
FFTW_EXTERN int X(import_system_wisdom)(void); \
FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \
FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \
FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \
FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \
\
FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \
FFTW_EXTERN void X(print_plan)(const X(plan) p); \
FFTW_EXTERN char *X(sprint_plan)(const X(plan) p); \
\
FFTW_EXTERN void *X(malloc)(size_t n); \
FFTW_EXTERN R *X(alloc_real)(size_t n); \
FFTW_EXTERN C *X(alloc_complex)(size_t n); \
FFTW_EXTERN void X(free)(void *p); \
\
FFTW_EXTERN void X(flops)(const X(plan) p, \
double *add, double *mul, double *fmas); \
FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \
FFTW_EXTERN double X(cost)(const X(plan) p); \
\
FFTW_EXTERN int X(alignment_of)(R *p); \
FFTW_EXTERN const char X(version)[]; \
FFTW_EXTERN const char X(cc)[]; \
FFTW_EXTERN const char X(codelet_optim)[];
/* end of FFTW_DEFINE_API macro */
FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
&& !(defined(__ICC) || defined(__INTEL_COMPILER) || defined(__CUDACC__) || defined(__PGI)) \
&& (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
# if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
/* note: __float128 is a typedef, which is not supported with the _Complex
keyword in gcc, so instead we use this ugly __attribute__ version.
However, we can't simply pass the __attribute__ version to
FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */
# undef FFTW_DEFINE_COMPLEX
# define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C
# endif
FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
#endif
#define FFTW_FORWARD (-1)
#define FFTW_BACKWARD (+1)
#define FFTW_NO_TIMELIMIT (-1.0)
/* documented flags */
#define FFTW_MEASURE (0U)
#define FFTW_DESTROY_INPUT (1U << 0)
#define FFTW_UNALIGNED (1U << 1)
#define FFTW_CONSERVE_MEMORY (1U << 2)
#define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */
#define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */
#define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */
#define FFTW_ESTIMATE (1U << 6)
#define FFTW_WISDOM_ONLY (1U << 21)
/* undocumented beyond-guru flags */
#define FFTW_ESTIMATE_PATIENT (1U << 7)
#define FFTW_BELIEVE_PCOST (1U << 8)
#define FFTW_NO_DFT_R2HC (1U << 9)
#define FFTW_NO_NONTHREADED (1U << 10)
#define FFTW_NO_BUFFERING (1U << 11)
#define FFTW_NO_INDIRECT_OP (1U << 12)
#define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */
#define FFTW_NO_RANK_SPLITS (1U << 14)
#define FFTW_NO_VRANK_SPLITS (1U << 15)
#define FFTW_NO_VRECURSE (1U << 16)
#define FFTW_NO_SIMD (1U << 17)
#define FFTW_NO_SLOW (1U << 18)
#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19)
#define FFTW_ALLOW_PRUNING (1U << 20)
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* FFTW3_H */

View file

@ -1,106 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>673</width>
<height>391</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>160</x>
<y>345</y>
<width>351</width>
<height>33</height>
</rect>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>15</x>
<y>15</y>
<width>642</width>
<height>312</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>673</width>
<height>391</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>160</x>
<y>345</y>
<width>351</width>
<height>33</height>
</rect>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>15</x>
<y>15</y>
<width>642</width>
<height>312</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>

226
galois.c
View file

@ -1,113 +1,113 @@
/*****************************
* Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009
*
* This software library is licensed under terms of the GNU GENERAL
* PUBLIC LICENSE
*
* RSCODE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* RSCODE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Rscode. If not, see <http://www.gnu.org/licenses/>.
* Commercial licensing is available under a separate license, please
* contact author for details.
*
* Source code is available at http://rscode.sourceforge.net
*
*
* Multiplication and Arithmetic on Galois Field GF(256)
*
* From Mee, Daniel, "Magnetic Recording, Volume III", Ch. 5 by Patel.
*
*
******************************/
#include <stdio.h>
#include <stdlib.h>
#include "ecc.h"
/* This is one of 14 irreducible polynomials
* of degree 8 and cycle length 255. (Ch 5, pp. 275, Magnetic Recording)
* The high order 1 bit is implicit */
/* x^8 + x^4 + x^3 + x^2 + 1 */
#define PPOLY 0x1D
int gexp[512];
int glog[256];
static void init_exp_table (void);
void
init_galois_tables (void)
{
/* initialize the table of powers of alpha */
init_exp_table();
}
static void
init_exp_table (void)
{
int i, z;
int pinit,p1,p2,p3,p4,p5,p6,p7,p8;
pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0;
p1 = 1;
gexp[0] = 1;
gexp[255] = gexp[0];
glog[0] = 0; /* shouldn't log[0] be an error? */
// Private pp8() As Integer = {1, 0, 1, 1, 1, 0, 0, 0, 1} 'specify irreducible polynomial coeffts */
for (i = 1; i < 256; i++) {
pinit = p8;
p8 = p7;
p7 = p6;
p6 = p5;
p5 = p4 ^ pinit;
p4 = p3 ^ pinit;
p3 = p2 ^ pinit;
p2 = p1;
p1 = pinit;
gexp[i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128;
gexp[i+255] = gexp[i];
}
for (i = 1; i < 256; i++) {
for (z = 0; z < 256; z++) {
if (gexp[z] == i) {
glog[i] = z;
break;
}
}
}
}
/* multiplication using logarithms */
int gmult(int a, int b)
{
int i,j;
if (a==0 || b == 0) return (0);
i = glog[a];
j = glog[b];
return (gexp[i+j]);
}
int ginv (int elt)
{
return (gexp[255-glog[elt]]);
}
/*****************************
* Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009
*
* This software library is licensed under terms of the GNU GENERAL
* PUBLIC LICENSE
*
* RSCODE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* RSCODE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Rscode. If not, see <http://www.gnu.org/licenses/>.
* Commercial licensing is available under a separate license, please
* contact author for details.
*
* Source code is available at http://rscode.sourceforge.net
*
*
* Multiplication and Arithmetic on Galois Field GF(256)
*
* From Mee, Daniel, "Magnetic Recording, Volume III", Ch. 5 by Patel.
*
*
******************************/
#include <stdio.h>
#include <stdlib.h>
#include "ecc.h"
/* This is one of 14 irreducible polynomials
* of degree 8 and cycle length 255. (Ch 5, pp. 275, Magnetic Recording)
* The high order 1 bit is implicit */
/* x^8 + x^4 + x^3 + x^2 + 1 */
#define PPOLY 0x1D
int gexp[512];
int glog[256];
static void init_exp_table (void);
void
init_galois_tables (void)
{
/* initialize the table of powers of alpha */
init_exp_table();
}
static void
init_exp_table (void)
{
int i, z;
int pinit,p1,p2,p3,p4,p5,p6,p7,p8;
pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0;
p1 = 1;
gexp[0] = 1;
gexp[255] = gexp[0];
glog[0] = 0; /* shouldn't log[0] be an error? */
// Private pp8() As Integer = {1, 0, 1, 1, 1, 0, 0, 0, 1} 'specify irreducible polynomial coeffts */
for (i = 1; i < 256; i++) {
pinit = p8;
p8 = p7;
p7 = p6;
p6 = p5;
p5 = p4 ^ pinit;
p4 = p3 ^ pinit;
p3 = p2 ^ pinit;
p2 = p1;
p1 = pinit;
gexp[i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128;
gexp[i+255] = gexp[i];
}
for (i = 1; i < 256; i++) {
for (z = 0; z < 256; z++) {
if (gexp[z] == i) {
glog[i] = z;
break;
}
}
}
}
/* multiplication using logarithms */
int gmult(int a, int b)
{
int i,j;
if (a==0 || b == 0) return (0);
i = glog[a];
j = glog[b];
return (gexp[i+j]);
}
int ginv (int elt)
{
return (gexp[255-glog[elt]]);
}

1820
hid.c

File diff suppressed because it is too large Load diff

9006
il2p.c

File diff suppressed because it is too large Load diff

View file

@ -1,490 +1,490 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
/*
uses sysutils,classes;
procedure KISS_init;
procedure KISS_free;
procedure KISS_add_stream(socket: integer);
procedure KISS_del_stream(socket: integer);
procedure KISS_on_data_in(socket: integer; data: string);
procedure KISS_on_data_out(port: byte; frame: string);
procedure KISS_send_ack(port: byte; data: string);
procedure KISS_send_ack1(port: byte);
*/
// I don't like this. maybe fine for Dephi but overcomlicated for C
// I think I need a struct for each connection, but a simple array of entries should be fine
// My normal ** and count system
// Each needs an input buffer of max size kiss frame and length (or maybe string is a good idea)
TKISSMode ** KissConnections = NULL;
int KISSConCount = 0;
#define FEND 0xc0
#define FESC 0xDB
#define TFEND 0xDC
#define TFESC 0xDD
#define KISS_ACKMODE 0x0C
#define KISS_DATA 0
struct TKISSMode_t KISS;
int KISS_encode(UCHAR * KISSBuffer, int port, string * frame, int TXMON);
void KISS_init()
{
int i;
KISS.data_in = newString();
// initTStringList(KISS.socket);
for (i = 0; i < 4; i++)
{
initTStringList(&KISS.buffer[i]);
}
}
/*
procedure KISS_free;
var
i: byte;
begin
KISS.data_in.Free;
KISS.socket.Free;
for i:=1 to 4 do
begin
KISS.buffer[i].Free;
KISS.request[i].Free;
KISS.acked[i].Free;
KISS.irequest[i].Free;
KISS.iacked[i].Free;
end;
end;
*/
void KISS_add_stream(void * Socket)
{
// Add a new connection. Called when QT accepts an incoming call}
TKISSMode * KISS;
KissConnections = realloc(KissConnections, (KISSConCount + 1) * sizeof(void *));
KISS = KissConnections[KISSConCount++] = malloc(sizeof(KISS));
KISS->Socket = Socket;
KISS->data_in = newString();
}
void KISS_del_socket(void * socket)
{
int i;
TKISSMode * KISS = NULL;
if (KISSConCount == 0)
return;
for (i = 0; i < KISSConCount; i++)
{
if (KissConnections[i]->Socket == socket)
{
KISS = KissConnections[i];
break;
}
}
if (KISS == NULL)
return;
// Need to remove entry and move others down
KISSConCount--;
while (i < KISSConCount)
{
KissConnections[i] = KissConnections[i + 1];
i++;
}
}
void KISS_on_data_out(int port, string * frame, int TX)
{
int Len;
UCHAR * KISSFrame = (UCHAR *)malloc(512); // cant pass local data via signal/slot
Len = KISS_encode(KISSFrame, port, frame, TX);
KISSSendtoServer(NULL, KISSFrame, Len); // Send to all open sockets
}
void ProcessKISSFrame(void * socket, UCHAR * Msg, int Len)
{
int n = Len;
UCHAR c;
int ESCFLAG = 0;
UCHAR * ptr1, *ptr2;
int Chan;
int Opcode;
string * TXMSG;
unsigned short CRC;
UCHAR CRCString[2];
ptr1 = ptr2 = Msg;
while (n--)
{
c = *(ptr1++);
if (ESCFLAG)
{
//
// FESC received - next should be TFESC or TFEND
ESCFLAG = 0;
if (c == TFESC)
c = FESC;
if (c == TFEND)
c = FEND;
}
else
{
switch (c)
{
case FEND:
//
// Either start of message or message complete
//
// npKISSINFO->MSGREADY = TRUE;
return;
case FESC:
ESCFLAG = 1;
continue;
}
}
//
// Ok, a normal char
//
*(ptr2++) = c;
}
Len = ptr2 - Msg;
Chan = (Msg[0] >> 4);
Opcode = Msg[0] & 0x0f;
if (Chan > 3)
return;
switch (Opcode)
{
case KISS_ACKMODE:
// How best to do ACKMODE?? I think pass whole frame including CMD and ack bytes to all_frame_buf
// But ack should only be sent to client that sent the message - needs more thought!
TXMSG = newString();
stringAdd(TXMSG, &Msg[0], Len); // include Control
CRC = get_fcs(&Msg[3], Len - 3); // exclude control and ack bytes
CRCString[0] = CRC & 0xff;
CRCString[1] = CRC >> 8;
stringAdd(TXMSG, CRCString, 2);
// Ackmode needs to know where to send ack back to, so save socket on end of data
stringAdd(TXMSG, (unsigned char * )&socket, sizeof(socket));
// if KISS Optimise see if frame is really needed
if (!KISS_opt[Chan])
Add(&KISS.buffer[Chan], TXMSG);
else
{
if (add_raw_frames(Chan, TXMSG, &KISS.buffer[Chan]))
Add(&KISS.buffer[Chan], TXMSG);
}
return;
case KISS_DATA:
TXMSG = newString();
stringAdd(TXMSG, &Msg[0], Len); // include Control
CRC = get_fcs(&Msg[1], Len - 1);
CRCString[0] = CRC & 0xff;
CRCString[1] = CRC >> 8;
stringAdd(TXMSG, CRCString, 2);
// if KISS Optimise see if frame is really needed
if (!KISS_opt[Chan])
Add(&KISS.buffer[Chan], TXMSG);
else
{
if (add_raw_frames(Chan, TXMSG, &KISS.buffer[Chan]))
Add(&KISS.buffer[Chan], TXMSG);
}
return;
}
// Still need to process kiss control frames
}
void KISSDataReceived(void * socket, UCHAR * data, int length)
{
int i;
UCHAR * ptr1, * ptr2;
int Length;
TKISSMode * KISS = NULL;
if (KISSConCount == 0)
return;
for (i = 0; i < KISSConCount; i++)
{
if (KissConnections[i]->Socket == socket)
{
KISS = KissConnections[i];
break;
}
}
if (KISS == NULL)
return;
stringAdd(KISS->data_in, data, length);
if (KISS->data_in->Length > 10000) // Probably AGW Data on KISS Port
{
KISS->data_in->Length = 0;
return;
}
ptr1 = KISS->data_in->Data;
Length = KISS->data_in->Length;
while ((ptr2 = memchr(ptr1, FEND, Length)))
{
int Len = (ptr2 - ptr1);
if (Len == 0)
{
// Start of frame
mydelete(KISS->data_in, 0, 1);
ptr1 = KISS->data_in->Data;
Length = KISS->data_in->Length;
continue;
}
// Process Frame
if (Len < 350) // Drop obviously corrupt frames
ProcessKISSFrame(socket, ptr1, Len);
mydelete(KISS->data_in, 0, Len + 1);
ptr1 = KISS->data_in->Data;
Length = KISS->data_in->Length;
}
/* if (length(KISS.data_in.Strings[idx]) > 65535)
if Form1.ServerSocket2.Socket.ActiveConnections > 0)
for i:=0 to Form1.ServerSocket2.Socket.ActiveConnections-1 do
if Form1.ServerSocket2.Socket.Connections[i].SocketHandle=socket then
try Form1.ServerSocket2.Socket.Connections[i].Close; except end;
*/
}
int KISS_encode(UCHAR * KISSBuffer, int port, string * frame, int TXMON)
{
// Encode frame
UCHAR * ptr1 = frame->Data;
UCHAR TXCCC = 0;
int Len = frame->Length - 2; // frame includes CRC
UCHAR * ptr2 = &KISSBuffer[2];
UCHAR c;
if (TXMON)
{
// TX Frame has control byte on front
ptr1++;
Len--;
}
KISSBuffer[0] = FEND;
KISSBuffer[1] = port << 4;
TXCCC ^= KISSBuffer[1];
while (Len--)
{
c = *(ptr1++);
TXCCC ^= c;
switch (c)
{
case FEND:
(*ptr2++) = FESC;
(*ptr2++) = TFEND;
break;
case FESC:
(*ptr2++) = FESC;
(*ptr2++) = TFESC;
break;
// Drop through
default:
(*ptr2++) = c;
}
}
// If using checksum, send it
/*
if (KISSFLAGS & CHECKSUM)
{
c = (UCHAR)KISS->TXCCC;
// On TNC-X based boards, it is difficult to cope with an encoded CRC, so if
// CRC is FEND, send it as 0xc1. This means we have to accept 00 or 01 as valid.
// which is a slight loss in robustness
if (c == FEND && (PORT->KISSFLAGS & TNCX))
{
(*ptr2++) = FEND + 1;
}
else
{
switch (c)
{
case FEND:
(*ptr2++) = FESC;
(*ptr2++) = TFEND;
break;
case FESC:
(*ptr2++) = FESC;
(*ptr2++) = TFESC;
break;
default:
(*ptr2++) = c;
}
}
}
*/
(*ptr2++) = FEND;
return (int)(ptr2 - KISSBuffer);
}
void sendAckModeAcks(int snd_ch)
{
// format and send any outstanding acks
string * temp;
UCHAR * Msg;
void * socket;
while (KISS_acked[snd_ch].Count)
{
UCHAR * ACK = (UCHAR *)malloc(15);
UCHAR * ackptr = ACK;
temp = Strings(&KISS_acked[snd_ch], 0); // get first
Msg = temp->Data;
*ackptr++ = FEND;
*ackptr++ = Msg[0]; // opcode and channel
*ackptr++ = Msg[1];
*ackptr++ = Msg[2]; // ACK Bytes
*ackptr++ = FEND;
// Socket to reply to is on end
Msg += (temp->Length - 4);
memcpy(&socket, Msg, sizeof(void *));
KISSSendtoServer(socket, ACK, 5);
Delete(&KISS_acked[snd_ch], 0); // This will invalidate temp
}
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "UZ7HOStuff.h"
/*
uses sysutils,classes;
procedure KISS_init;
procedure KISS_free;
procedure KISS_add_stream(socket: integer);
procedure KISS_del_stream(socket: integer);
procedure KISS_on_data_in(socket: integer; data: string);
procedure KISS_on_data_out(port: byte; frame: string);
procedure KISS_send_ack(port: byte; data: string);
procedure KISS_send_ack1(port: byte);
*/
// I don't like this. maybe fine for Dephi but overcomlicated for C
// I think I need a struct for each connection, but a simple array of entries should be fine
// My normal ** and count system
// Each needs an input buffer of max size kiss frame and length (or maybe string is a good idea)
TKISSMode ** KissConnections = NULL;
int KISSConCount = 0;
#define FEND 0xc0
#define FESC 0xDB
#define TFEND 0xDC
#define TFESC 0xDD
#define KISS_ACKMODE 0x0C
#define KISS_DATA 0
struct TKISSMode_t KISS;
int KISS_encode(UCHAR * KISSBuffer, int port, string * frame, int TXMON);
void KISS_init()
{
int i;
KISS.data_in = newString();
// initTStringList(KISS.socket);
for (i = 0; i < 4; i++)
{
initTStringList(&KISS.buffer[i]);
}
}
/*
procedure KISS_free;
var
i: byte;
begin
KISS.data_in.Free;
KISS.socket.Free;
for i:=1 to 4 do
begin
KISS.buffer[i].Free;
KISS.request[i].Free;
KISS.acked[i].Free;
KISS.irequest[i].Free;
KISS.iacked[i].Free;
end;
end;
*/
void KISS_add_stream(void * Socket)
{
// Add a new connection. Called when QT accepts an incoming call}
TKISSMode * KISS;
KissConnections = realloc(KissConnections, (KISSConCount + 1) * sizeof(void *));
KISS = KissConnections[KISSConCount++] = malloc(sizeof(KISS));
KISS->Socket = Socket;
KISS->data_in = newString();
}
void KISS_del_socket(void * socket)
{
int i;
TKISSMode * KISS = NULL;
if (KISSConCount == 0)
return;
for (i = 0; i < KISSConCount; i++)
{
if (KissConnections[i]->Socket == socket)
{
KISS = KissConnections[i];
break;
}
}
if (KISS == NULL)
return;
// Need to remove entry and move others down
KISSConCount--;
while (i < KISSConCount)
{
KissConnections[i] = KissConnections[i + 1];
i++;
}
}
void KISS_on_data_out(int port, string * frame, int TX)
{
int Len;
UCHAR * KISSFrame = (UCHAR *)malloc(512); // cant pass local data via signal/slot
Len = KISS_encode(KISSFrame, port, frame, TX);
KISSSendtoServer(NULL, KISSFrame, Len); // Send to all open sockets
}
void ProcessKISSFrame(void * socket, UCHAR * Msg, int Len)
{
int n = Len;
UCHAR c;
int ESCFLAG = 0;
UCHAR * ptr1, *ptr2;
int Chan;
int Opcode;
string * TXMSG;
unsigned short CRC;
UCHAR CRCString[2];
ptr1 = ptr2 = Msg;
while (n--)
{
c = *(ptr1++);
if (ESCFLAG)
{
//
// FESC received - next should be TFESC or TFEND
ESCFLAG = 0;
if (c == TFESC)
c = FESC;
if (c == TFEND)
c = FEND;
}
else
{
switch (c)
{
case FEND:
//
// Either start of message or message complete
//
// npKISSINFO->MSGREADY = TRUE;
return;
case FESC:
ESCFLAG = 1;
continue;
}
}
//
// Ok, a normal char
//
*(ptr2++) = c;
}
Len = ptr2 - Msg;
Chan = (Msg[0] >> 4);
Opcode = Msg[0] & 0x0f;
if (Chan > 3)
return;
switch (Opcode)
{
case KISS_ACKMODE:
// How best to do ACKMODE?? I think pass whole frame including CMD and ack bytes to all_frame_buf
// But ack should only be sent to client that sent the message - needs more thought!
TXMSG = newString();
stringAdd(TXMSG, &Msg[0], Len); // include Control
CRC = get_fcs(&Msg[3], Len - 3); // exclude control and ack bytes
CRCString[0] = CRC & 0xff;
CRCString[1] = CRC >> 8;
stringAdd(TXMSG, CRCString, 2);
// Ackmode needs to know where to send ack back to, so save socket on end of data
stringAdd(TXMSG, (unsigned char * )&socket, sizeof(socket));
// if KISS Optimise see if frame is really needed
if (!KISS_opt[Chan])
Add(&KISS.buffer[Chan], TXMSG);
else
{
if (add_raw_frames(Chan, TXMSG, &KISS.buffer[Chan]))
Add(&KISS.buffer[Chan], TXMSG);
}
return;
case KISS_DATA:
TXMSG = newString();
stringAdd(TXMSG, &Msg[0], Len); // include Control
CRC = get_fcs(&Msg[1], Len - 1);
CRCString[0] = CRC & 0xff;
CRCString[1] = CRC >> 8;
stringAdd(TXMSG, CRCString, 2);
// if KISS Optimise see if frame is really needed
if (!KISS_opt[Chan])
Add(&KISS.buffer[Chan], TXMSG);
else
{
if (add_raw_frames(Chan, TXMSG, &KISS.buffer[Chan]))
Add(&KISS.buffer[Chan], TXMSG);
}
return;
}
// Still need to process kiss control frames
}
void KISSDataReceived(void * socket, UCHAR * data, int length)
{
int i;
UCHAR * ptr1, * ptr2;
int Length;
TKISSMode * KISS = NULL;
if (KISSConCount == 0)
return;
for (i = 0; i < KISSConCount; i++)
{
if (KissConnections[i]->Socket == socket)
{
KISS = KissConnections[i];
break;
}
}
if (KISS == NULL)
return;
stringAdd(KISS->data_in, data, length);
if (KISS->data_in->Length > 10000) // Probably AGW Data on KISS Port
{
KISS->data_in->Length = 0;
return;
}
ptr1 = KISS->data_in->Data;
Length = KISS->data_in->Length;
while ((ptr2 = memchr(ptr1, FEND, Length)))
{
int Len = (ptr2 - ptr1);
if (Len == 0)
{
// Start of frame
mydelete(KISS->data_in, 0, 1);
ptr1 = KISS->data_in->Data;
Length = KISS->data_in->Length;
continue;
}
// Process Frame
if (Len < 350) // Drop obviously corrupt frames
ProcessKISSFrame(socket, ptr1, Len);
mydelete(KISS->data_in, 0, Len + 1);
ptr1 = KISS->data_in->Data;
Length = KISS->data_in->Length;
}
/* if (length(KISS.data_in.Strings[idx]) > 65535)
if Form1.ServerSocket2.Socket.ActiveConnections > 0)
for i:=0 to Form1.ServerSocket2.Socket.ActiveConnections-1 do
if Form1.ServerSocket2.Socket.Connections[i].SocketHandle=socket then
try Form1.ServerSocket2.Socket.Connections[i].Close; except end;
*/
}
int KISS_encode(UCHAR * KISSBuffer, int port, string * frame, int TXMON)
{
// Encode frame
UCHAR * ptr1 = frame->Data;
UCHAR TXCCC = 0;
int Len = frame->Length - 2; // frame includes CRC
UCHAR * ptr2 = &KISSBuffer[2];
UCHAR c;
if (TXMON)
{
// TX Frame has control byte on front
ptr1++;
Len--;
}
KISSBuffer[0] = FEND;
KISSBuffer[1] = port << 4;
TXCCC ^= KISSBuffer[1];
while (Len--)
{
c = *(ptr1++);
TXCCC ^= c;
switch (c)
{
case FEND:
(*ptr2++) = FESC;
(*ptr2++) = TFEND;
break;
case FESC:
(*ptr2++) = FESC;
(*ptr2++) = TFESC;
break;
// Drop through
default:
(*ptr2++) = c;
}
}
// If using checksum, send it
/*
if (KISSFLAGS & CHECKSUM)
{
c = (UCHAR)KISS->TXCCC;
// On TNC-X based boards, it is difficult to cope with an encoded CRC, so if
// CRC is FEND, send it as 0xc1. This means we have to accept 00 or 01 as valid.
// which is a slight loss in robustness
if (c == FEND && (PORT->KISSFLAGS & TNCX))
{
(*ptr2++) = FEND + 1;
}
else
{
switch (c)
{
case FEND:
(*ptr2++) = FESC;
(*ptr2++) = TFEND;
break;
case FESC:
(*ptr2++) = FESC;
(*ptr2++) = TFESC;
break;
default:
(*ptr2++) = c;
}
}
}
*/
(*ptr2++) = FEND;
return (int)(ptr2 - KISSBuffer);
}
void sendAckModeAcks(int snd_ch)
{
// format and send any outstanding acks
string * temp;
UCHAR * Msg;
void * socket;
while (KISS_acked[snd_ch].Count)
{
UCHAR * ACK = (UCHAR *)malloc(15);
UCHAR * ackptr = ACK;
temp = Strings(&KISS_acked[snd_ch], 0); // get first
Msg = temp->Data;
*ackptr++ = FEND;
*ackptr++ = Msg[0]; // opcode and channel
*ackptr++ = Msg[1];
*ackptr++ = Msg[2]; // ACK Bytes
*ackptr++ = FEND;
// Socket to reply to is on end
Msg += (temp->Length - 4);
memcpy(&socket, Msg, sizeof(void *));
KISSSendtoServer(socket, ACK, 5);
Delete(&KISS_acked[snd_ch], 0); // This will invalidate temp
}
}

File diff suppressed because it is too large Load diff

176
main.cpp
View file

@ -1,88 +1,88 @@
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "QtSoundModem.h"
#include <QtWidgets/QApplication>
#include "UZ7HOStuff.h"
extern "C" int nonGUIMode;
extern void getSettings();
extern void saveSettings();
extern int Closing;
workerThread *t;
mynet m1;
QCoreApplication * a;
QtSoundModem * w;
int main(int argc, char *argv[])
{
char Title[128];
if (argc > 1 && strcmp(argv[1], "nogui") == 0)
nonGUIMode = 1;
if (nonGUIMode)
sprintf(Title, "QtSoundModem Version %s Running in non-GUI Mode", VersionString);
else
sprintf(Title, "QtSoundModem Version %s Running in GUI Mode", VersionString);
qDebug() << Title;
if (nonGUIMode)
a = new QCoreApplication(argc, argv);
else
a = new QApplication(argc, argv); // GUI version
getSettings();
t = new workerThread;
if (nonGUIMode == 0)
{
w = new QtSoundModem();
char Title[128];
sprintf(Title, "QtSoundModem Version %s Ports %d/%d", VersionString, AGWPort, KISSPort);
w->setWindowTitle(Title);
w->show();
}
QObject::connect(&m1, SIGNAL(HLSetPTT(int)), &m1, SLOT(doHLSetPTT(int)), Qt::QueuedConnection);
QObject::connect(&m1, SIGNAL(startTimer(int)), &m1, SLOT(dostartTimer(int)), Qt::QueuedConnection);
QObject::connect(&m1, SIGNAL(stopTimer()), &m1, SLOT(dostopTimer()), Qt::QueuedConnection);
t->start(); // This runs init
m1.start(); // Start TCP
return a->exec();
}
/*
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
This file is part of QtSoundModem
QtSoundModem is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtSoundModem is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QtSoundModem. If not, see http://www.gnu.org/licenses
*/
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
#include "QtSoundModem.h"
#include <QtWidgets/QApplication>
#include "UZ7HOStuff.h"
extern "C" int nonGUIMode;
extern void getSettings();
extern void saveSettings();
extern int Closing;
workerThread *t;
mynet m1;
QCoreApplication * a;
QtSoundModem * w;
int main(int argc, char *argv[])
{
char Title[128];
if (argc > 1 && strcmp(argv[1], "nogui") == 0)
nonGUIMode = 1;
if (nonGUIMode)
sprintf(Title, "QtSoundModem Version %s Running in non-GUI Mode", VersionString);
else
sprintf(Title, "QtSoundModem Version %s Running in GUI Mode", VersionString);
qDebug() << Title;
if (nonGUIMode)
a = new QCoreApplication(argc, argv);
else
a = new QApplication(argc, argv); // GUI version
getSettings();
t = new workerThread;
if (nonGUIMode == 0)
{
w = new QtSoundModem();
char Title[128];
sprintf(Title, "QtSoundModem Version %s Ports %d/%d", VersionString, AGWPort, KISSPort);
w->setWindowTitle(Title);
w->show();
}
QObject::connect(&m1, SIGNAL(HLSetPTT(int)), &m1, SLOT(doHLSetPTT(int)), Qt::QueuedConnection);
QObject::connect(&m1, SIGNAL(startTimer(int)), &m1, SLOT(dostartTimer(int)), Qt::QueuedConnection);
QObject::connect(&m1, SIGNAL(stopTimer()), &m1, SLOT(dostopTimer()), Qt::QueuedConnection);
t->start(); // This runs init
m1.start(); // Start TCP
return a->exec();
}

3110
ofdm.c

File diff suppressed because it is too large Load diff

View file

@ -1,198 +1,198 @@
//
// Code for Packet using ARDOP like frames.
//
// This Module handles frame level stuff, and can be used
// with a KISS interface. Module pktSession inplements an
// ax.25 like Level 2, with dynamic parameter updating
//
// This uses Special Variable Length frames
// Packet has header of 6 bytes sent in 4FSK.500.100.
// Header is 6 bits Type 10 Bits Len 2 bytes CRC 2 bytes RS
// Once we have that we receive the rest of the packet in the
// mode defined in the header.
// Uses Frame Type 0xC0, symbolic name PktFrameHeader
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
#include <winioctl.h>
#else
#define HANDLE int
#endif
#include "ARDOPC.h"
extern UCHAR KISSBUFFER[500]; // Long enough for stuffed KISS frame
extern int KISSLength;
VOID EncodePacket(UCHAR * Data, int Len);
VOID AddTxByteDirect(UCHAR Byte);
VOID AddTxByteStuffed(UCHAR Byte);
unsigned short int compute_crc(unsigned char *buf,int len);
void PacketStartTX();
BOOL GetNextKISSFrame();
VOID SendAckModeAck();
extern unsigned char bytEncodedBytes[4500]; // I think the biggest is 600 bd 768 + overhead
extern int EncLen;
extern UCHAR PacketMon[360];
extern int PacketMonMore;
extern int PacketMonLength;
#define ARDOPBufferSize 12000 * 100
short ARDOPTXBuffer[4][12000 * 100]; // Enough to hold whole frame of samples
int ARDOPTXLen[4] = { 0,0,0,0 }; // Length of frame
int ARDOPTXPtr[4] = { 0,0,0,0 }; // Tx Pointer
int pktBandwidth = 4;
int pktMaxBandwidth = 8;
int pktMaxFrame = 4;
int pktPacLen = 80;
int pktMode = 0;
int pktRXMode; // Currently receiving mode
int pktDataLen;
int pktRSLen;
// Now use Mode number to encode type and bandwidth
const char pktMod[16][12] = {
"4PSK/200",
"4FSK/500", "4PSK/500", "8PSK/500", "16QAM/500",
"4FSK/1000", "4PSK/1000", "8PSK/1000", "16QAM/1000",
"4FSK/2000", "4PSK/2000", "8PSK/2000", "16QAM/2000",
};
// Note FSK modes, though identified as 200 500 or 1000 actually
// occupy 500, 1000 or 2000 BW
const int pktBW[16] = {200,
500, 500, 500, 500,
1000, 1000, 1000, 1000,
2000, 2500, 2500, 2500};
const int pktCarriers[16] = {
1,
1, 2, 2, 2,
2, 4, 4, 4,
4, 10, 10, 10};
const BOOL pktFSK[16] = {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0};
int pktModeLen = 13;
VOID PktARDOPEncode(UCHAR * Data, int Len, int Chan)
{
unsigned char DataToSend[4];
int pktNumCar = pktCarriers[pktMode];
// Header now sent as 4FSK.500.100
// 6 Bits Mode, 10 Bits Length
// 2 Bytes Header 2 Bytes CRC 2 Bytes RS
if (Len > 1023)
return;
DataToSend[0] = (pktMode << 2)|(Len >> 8);
DataToSend[1] = Len & 0xff;
// Calc Data and RS Length
pktDataLen = (Len + (pktNumCar - 1))/pktNumCar; // Round up
pktRSLen = pktDataLen >> 2; // Try 25% for now
if (pktRSLen & 1)
pktRSLen++; // Odd RS bytes no use
if (pktRSLen < 4)
pktRSLen = 4; // At least 4
// Encode Header
EncLen = EncodeFSKData(PktFrameHeader, DataToSend, 2, bytEncodedBytes);
// Encode Data
if (pktFSK[pktMode])
EncodeFSKData(PktFrameData, Data, Len, &bytEncodedBytes[EncLen]);
else
EncodePSKData(PktFrameData, Data, Len, &bytEncodedBytes[EncLen]);
// Header is FSK
Mod4FSKDataAndPlay(bytEncodedBytes, EncLen, intCalcLeader, Chan); // Modulate Data frame
}
// Called when link idle to see if any packet frames to send
void PktARDOPStartTX()
{
/*
if (GetNextKISSFrame() == FALSE)
return; // nothing to send
while (TRUE) // loop till we run out of packets
{
switch(KISSBUFFER[0])
{
case 0: // Normal Data
WriteDebugLog(LOGALERT, "Sending Packet Frame Len %d", KISSLength - 1);
PktARDOPEncode(KISSBUFFER + 1, KISSLength - 1);
// Trace it
if (PacketMonLength == 0) // Ingore if one queued
{
PacketMon[0] = 0x80; // TX Flag
memcpy(&PacketMon[1], &KISSBUFFER[1], KISSLength);
PacketMonLength = KISSLength;
}
break;
case 6: // HW Paramters. Set Mode and Bandwidth
pktMode = KISSBUFFER[1];
break;
case 12:
// Ackmode frame. Return ACK Bytes (first 2) to host when TX complete
WriteDebugLog(LOGALERT, "Sending Packet Frame Len %d", KISSLength - 3);
PktARDOPEncode(KISSBUFFER + 3, KISSLength - 3);
// Returns when Complete so can send ACK
SendAckModeAck();
break;
}
// See if any more
if (GetNextKISSFrame() == FALSE)
break; // no more to send
}
*/
}
VOID SendAckModeAck()
{
}
//
// Code for Packet using ARDOP like frames.
//
// This Module handles frame level stuff, and can be used
// with a KISS interface. Module pktSession inplements an
// ax.25 like Level 2, with dynamic parameter updating
//
// This uses Special Variable Length frames
// Packet has header of 6 bytes sent in 4FSK.500.100.
// Header is 6 bits Type 10 Bits Len 2 bytes CRC 2 bytes RS
// Once we have that we receive the rest of the packet in the
// mode defined in the header.
// Uses Frame Type 0xC0, symbolic name PktFrameHeader
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
#include <winioctl.h>
#else
#define HANDLE int
#endif
#include "ARDOPC.h"
extern UCHAR KISSBUFFER[500]; // Long enough for stuffed KISS frame
extern int KISSLength;
VOID EncodePacket(UCHAR * Data, int Len);
VOID AddTxByteDirect(UCHAR Byte);
VOID AddTxByteStuffed(UCHAR Byte);
unsigned short int compute_crc(unsigned char *buf,int len);
void PacketStartTX();
BOOL GetNextKISSFrame();
VOID SendAckModeAck();
extern unsigned char bytEncodedBytes[4500]; // I think the biggest is 600 bd 768 + overhead
extern int EncLen;
extern UCHAR PacketMon[360];
extern int PacketMonMore;
extern int PacketMonLength;
#define ARDOPBufferSize 12000 * 100
short ARDOPTXBuffer[4][12000 * 100]; // Enough to hold whole frame of samples
int ARDOPTXLen[4] = { 0,0,0,0 }; // Length of frame
int ARDOPTXPtr[4] = { 0,0,0,0 }; // Tx Pointer
int pktBandwidth = 4;
int pktMaxBandwidth = 8;
int pktMaxFrame = 4;
int pktPacLen = 80;
int pktMode = 0;
int pktRXMode; // Currently receiving mode
int pktDataLen;
int pktRSLen;
// Now use Mode number to encode type and bandwidth
const char pktMod[16][12] = {
"4PSK/200",
"4FSK/500", "4PSK/500", "8PSK/500", "16QAM/500",
"4FSK/1000", "4PSK/1000", "8PSK/1000", "16QAM/1000",
"4FSK/2000", "4PSK/2000", "8PSK/2000", "16QAM/2000",
};
// Note FSK modes, though identified as 200 500 or 1000 actually
// occupy 500, 1000 or 2000 BW
const int pktBW[16] = {200,
500, 500, 500, 500,
1000, 1000, 1000, 1000,
2000, 2500, 2500, 2500};
const int pktCarriers[16] = {
1,
1, 2, 2, 2,
2, 4, 4, 4,
4, 10, 10, 10};
const BOOL pktFSK[16] = {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0};
int pktModeLen = 13;
VOID PktARDOPEncode(UCHAR * Data, int Len, int Chan)
{
unsigned char DataToSend[4];
int pktNumCar = pktCarriers[pktMode];
// Header now sent as 4FSK.500.100
// 6 Bits Mode, 10 Bits Length
// 2 Bytes Header 2 Bytes CRC 2 Bytes RS
if (Len > 1023)
return;
DataToSend[0] = (pktMode << 2)|(Len >> 8);
DataToSend[1] = Len & 0xff;
// Calc Data and RS Length
pktDataLen = (Len + (pktNumCar - 1))/pktNumCar; // Round up
pktRSLen = pktDataLen >> 2; // Try 25% for now
if (pktRSLen & 1)
pktRSLen++; // Odd RS bytes no use
if (pktRSLen < 4)
pktRSLen = 4; // At least 4
// Encode Header
EncLen = EncodeFSKData(PktFrameHeader, DataToSend, 2, bytEncodedBytes);
// Encode Data
if (pktFSK[pktMode])
EncodeFSKData(PktFrameData, Data, Len, &bytEncodedBytes[EncLen]);
else
EncodePSKData(PktFrameData, Data, Len, &bytEncodedBytes[EncLen]);
// Header is FSK
Mod4FSKDataAndPlay(bytEncodedBytes, EncLen, intCalcLeader, Chan); // Modulate Data frame
}
// Called when link idle to see if any packet frames to send
void PktARDOPStartTX()
{
/*
if (GetNextKISSFrame() == FALSE)
return; // nothing to send
while (TRUE) // loop till we run out of packets
{
switch(KISSBUFFER[0])
{
case 0: // Normal Data
WriteDebugLog(LOGALERT, "Sending Packet Frame Len %d", KISSLength - 1);
PktARDOPEncode(KISSBUFFER + 1, KISSLength - 1);
// Trace it
if (PacketMonLength == 0) // Ingore if one queued
{
PacketMon[0] = 0x80; // TX Flag
memcpy(&PacketMon[1], &KISSBUFFER[1], KISSLength);
PacketMonLength = KISSLength;
}
break;
case 6: // HW Paramters. Set Mode and Bandwidth
pktMode = KISSBUFFER[1];
break;
case 12:
// Ackmode frame. Return ACK Bytes (first 2) to host when TX complete
WriteDebugLog(LOGALERT, "Sending Packet Frame Len %d", KISSLength - 3);
PktARDOPEncode(KISSBUFFER + 3, KISSLength - 3);
// Returns when Complete so can send ACK
SendAckModeAck();
break;
}
// See if any more
if (GetNextKISSFrame() == FALSE)
break; // no more to send
}
*/
}
VOID SendAckModeAck()
{
}

1036
pulse.c

File diff suppressed because it is too large Load diff

11
release/moc_predefs.h Normal file
View file

@ -0,0 +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

View file

@ -1,14 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Resource.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Resource.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

428
rs.c
View file

@ -1,214 +1,214 @@
/*
* Reed Solomon Encoder/Decoder
*
* Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009
*
* This software library is licensed under terms of the GNU GENERAL
* PUBLIC LICENSE
*
* RSCODE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RSCODE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Rscode. If not, see <http://www.gnu.org/licenses/>.
* Commercial licensing is available under a separate license, please
* contact author for details.
*
* Source code is available at http://rscode.sourceforge.net
*/
#define LOGEMERGENCY 0
#define LOGALERT 1
#define LOGCRIT 2
#define LOGERROR 3
#define LOGWARNING 4
#define LOGNOTICE 5
#define LOGINFO 6
#define LOGDEBUG 7
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "ecc.h"
void Debugprintf(const char * format, ...);
/* Encoder parity bytes */
int pBytes[MAXDEG];
/* Decoder syndrome bytes */
int synBytes[MAXDEG];
/* generator polynomial */
int genPoly[MAXDEG*2];
int DEBUG = FALSE; //RUE;
static void
compute_genpoly (int nbytes, int genpoly[]);
/* Initialize lookup tables, polynomials, etc. */
void
initialize_ecc ()
{
/* Initialize the galois field arithmetic tables */
init_galois_tables();
/* Compute the encoder generator polynomial */
compute_genpoly(NPAR, genPoly);
}
void
zero_fill_from (unsigned char buf[], int from, int to)
{
int i;
for (i = from; i < to; i++) buf[i] = 0;
}
/* debugging routines */
void
print_parity (void)
{
int i;
Debugprintf("Parity Bytes: ");
for (i = 0; i < NPAR; i++)
Debugprintf("[%d]:%x, ",i,pBytes[i]);
Debugprintf("\n");
}
void
print_syndrome (void)
{
int i;
Debugprintf("Syndrome Bytes: ");
for (i = 0; i < NPAR; i++)
Debugprintf("[%d]:%x, ",i,synBytes[i]);
Debugprintf("\n");
}
/**********************************************************
* Reed Solomon Decoder
*
* Computes the syndrome of a codeword. Puts the results
* into the synBytes[] array.
*/
void
decode_data(unsigned char data[], int nbytes)
{
int i, j, sum;
for (j = 0; j < NPAR; j++)
{
sum = 0;
for (i = 0; i < nbytes; i++)
{
sum = data[i] ^ gmult(gexp[j+1], sum);
}
synBytes[j] = sum;
// Debugprintf("%d %d %d\r\n", i, synBytes[i], index_of[s[i]]);
}
}
/* Check if the syndrome is zero */
int
check_syndrome (void)
{
int i, nz = 0;
for (i =0 ; i < NPAR; i++) {
if (synBytes[i] != 0) {
nz = 1;
break;
}
}
return nz;
}
void
debug_check_syndrome (void)
{
int i;
for (i = 0; i < 3; i++) {
Debugprintf(" inv log S[%d]/S[%d] = %d\n", i, i+1,
glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);
}
}
/* Create a generator polynomial for an n byte RS code.
* The coefficients are returned in the genPoly arg.
* Make sure that the genPoly array which is passed in is
* at least n+1 bytes long.
*/
static void
compute_genpoly (int nbytes, int genpoly[])
{
int i, tp[256], tp1[256];
/* multiply (x + a^n) for n = 1 to nbytes */
zero_poly(tp1);
tp1[0] = 1;
for (i = 1; i <= nbytes; i++) {
zero_poly(tp);
tp[0] = gexp[i]; /* set up x+a^n */
tp[1] = 1;
mult_polys(genpoly, tp, tp1);
copy_poly(tp1, genpoly);
}
}
/* Simulate a LFSR with generator polynomial for n byte RS code.
* Pass in a pointer to the data array, and amount of data.
*
* The parity bytes are deposited into pBytes[], and the whole message
* and parity are copied to dest to make a codeword.
*
*/
void
encode_data (unsigned char msg[], int nbytes, unsigned char dst[])
{
int i ,dbyte, j;
unsigned char LFSR[MAXNPAR+1];
for(i=0; i < NPAR+1; i++)
LFSR[i]=0;
// for (i = 0; i < nbytes; i++)
for (i = nbytes-1; i >= 0; i--) // Order reversed for compatibility wiyh Rick' Code
{
dbyte = msg[i] ^ LFSR[NPAR-1];
for (j = NPAR-1; j > 0; j--)
{
LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);
}
LFSR[0] = gmult(genPoly[0], dbyte);
}
// return the parity bytes
memcpy(dst, LFSR, NPAR);
}
/*
* Reed Solomon Encoder/Decoder
*
* Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009
*
* This software library is licensed under terms of the GNU GENERAL
* PUBLIC LICENSE
*
* RSCODE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RSCODE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Rscode. If not, see <http://www.gnu.org/licenses/>.
* Commercial licensing is available under a separate license, please
* contact author for details.
*
* Source code is available at http://rscode.sourceforge.net
*/
#define LOGEMERGENCY 0
#define LOGALERT 1
#define LOGCRIT 2
#define LOGERROR 3
#define LOGWARNING 4
#define LOGNOTICE 5
#define LOGINFO 6
#define LOGDEBUG 7
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "ecc.h"
void Debugprintf(const char * format, ...);
/* Encoder parity bytes */
int pBytes[MAXDEG];
/* Decoder syndrome bytes */
int synBytes[MAXDEG];
/* generator polynomial */
int genPoly[MAXDEG*2];
int DEBUG = FALSE; //RUE;
static void
compute_genpoly (int nbytes, int genpoly[]);
/* Initialize lookup tables, polynomials, etc. */
void
initialize_ecc ()
{
/* Initialize the galois field arithmetic tables */
init_galois_tables();
/* Compute the encoder generator polynomial */
compute_genpoly(NPAR, genPoly);
}
void
zero_fill_from (unsigned char buf[], int from, int to)
{
int i;
for (i = from; i < to; i++) buf[i] = 0;
}
/* debugging routines */
void
print_parity (void)
{
int i;
Debugprintf("Parity Bytes: ");
for (i = 0; i < NPAR; i++)
Debugprintf("[%d]:%x, ",i,pBytes[i]);
Debugprintf("\n");
}
void
print_syndrome (void)
{
int i;
Debugprintf("Syndrome Bytes: ");
for (i = 0; i < NPAR; i++)
Debugprintf("[%d]:%x, ",i,synBytes[i]);
Debugprintf("\n");
}
/**********************************************************
* Reed Solomon Decoder
*
* Computes the syndrome of a codeword. Puts the results
* into the synBytes[] array.
*/
void
decode_data(unsigned char data[], int nbytes)
{
int i, j, sum;
for (j = 0; j < NPAR; j++)
{
sum = 0;
for (i = 0; i < nbytes; i++)
{
sum = data[i] ^ gmult(gexp[j+1], sum);
}
synBytes[j] = sum;
// Debugprintf("%d %d %d\r\n", i, synBytes[i], index_of[s[i]]);
}
}
/* Check if the syndrome is zero */
int
check_syndrome (void)
{
int i, nz = 0;
for (i =0 ; i < NPAR; i++) {
if (synBytes[i] != 0) {
nz = 1;
break;
}
}
return nz;
}
void
debug_check_syndrome (void)
{
int i;
for (i = 0; i < 3; i++) {
Debugprintf(" inv log S[%d]/S[%d] = %d\n", i, i+1,
glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);
}
}
/* Create a generator polynomial for an n byte RS code.
* The coefficients are returned in the genPoly arg.
* Make sure that the genPoly array which is passed in is
* at least n+1 bytes long.
*/
static void
compute_genpoly (int nbytes, int genpoly[])
{
int i, tp[256], tp1[256];
/* multiply (x + a^n) for n = 1 to nbytes */
zero_poly(tp1);
tp1[0] = 1;
for (i = 1; i <= nbytes; i++) {
zero_poly(tp);
tp[0] = gexp[i]; /* set up x+a^n */
tp[1] = 1;
mult_polys(genpoly, tp, tp1);
copy_poly(tp1, genpoly);
}
}
/* Simulate a LFSR with generator polynomial for n byte RS code.
* Pass in a pointer to the data array, and amount of data.
*
* The parity bytes are deposited into pBytes[], and the whole message
* and parity are copied to dest to make a codeword.
*
*/
void
encode_data (unsigned char msg[], int nbytes, unsigned char dst[])
{
int i ,dbyte, j;
unsigned char LFSR[MAXNPAR+1];
for(i=0; i < NPAR+1; i++)
LFSR[i]=0;
// for (i = 0; i < nbytes; i++)
for (i = nbytes-1; i >= 0; i--) // Order reversed for compatibility wiyh Rick' Code
{
dbyte = msg[i] ^ LFSR[NPAR-1];
for (j = NPAR-1; j > 0; j--)
{
LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);
}
LFSR[0] = gmult(genPoly[0], dbyte);
}
// return the parity bytes
memcpy(dst, LFSR, NPAR);
}

1466
rsid.c

File diff suppressed because it is too large Load diff

5686
sm_main.c

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

152
tcpCode.h
View file

@ -1,76 +1,76 @@
#include <QtCore/QCoreApplication>
#include <QtNetwork>
//#include <QDebug>
#define CONNECT(sndr, sig, rcvr, slt) connect(sndr, SIGNAL(sig), rcvr, SLOT(slt))
class mynet : public QObject
{
Q_OBJECT
signals:
void HLSetPTT(int c);
void startTimer(int Time);
void stopTimer();
public:
void start();
void OpenUDP();
public slots:
void onAGWReadyRead();
void onKISSSocketStateChanged(QAbstractSocket::SocketState socketState);
void onKISSReadyRead();
void onAGWSocketStateChanged(QAbstractSocket::SocketState socketState);
void onKISSConnection();
void MyTimerSlot();
void onAGWConnection();
void dropPTT();
void displayError(QAbstractSocket::SocketError socketError);
void sendtoKISS(void * sock, unsigned char * Msg, int Len);
void HAMLIBdisplayError(QAbstractSocket::SocketError socketError);
void HAMLIBreadyRead();
void onHAMLIBSocketStateChanged(QAbstractSocket::SocketState socketState);
void ConnecttoHAMLIB();
void dostartTimer(int Time);
void dostopTimer();
void doHLSetPTT(int c);
void readPendingDatagrams();
void socketError();
private:
QTcpServer* tcpServer;
QTcpSocket* tcpClient;
QTcpSocket* tcpServerConnection;
int bytesToWrite;
int bytesWritten;
int bytesReceived;
int TotalBytes;
int PayloadSize;
};
class workerThread : public QThread
{
Q_OBJECT
signals:
void updateDCD(int, int);
void sendtoTrace(char *, int);
void sendtoKISS(void *, unsigned char *, int);
void openSockets();
private:
void run();
public:
};
#include <QtCore/QCoreApplication>
#include <QtNetwork>
//#include <QDebug>
#define CONNECT(sndr, sig, rcvr, slt) connect(sndr, SIGNAL(sig), rcvr, SLOT(slt))
class mynet : public QObject
{
Q_OBJECT
signals:
void HLSetPTT(int c);
void startTimer(int Time);
void stopTimer();
public:
void start();
void OpenUDP();
public slots:
void onAGWReadyRead();
void onKISSSocketStateChanged(QAbstractSocket::SocketState socketState);
void onKISSReadyRead();
void onAGWSocketStateChanged(QAbstractSocket::SocketState socketState);
void onKISSConnection();
void MyTimerSlot();
void onAGWConnection();
void dropPTT();
void displayError(QAbstractSocket::SocketError socketError);
void sendtoKISS(void * sock, unsigned char * Msg, int Len);
void HAMLIBdisplayError(QAbstractSocket::SocketError socketError);
void HAMLIBreadyRead();
void onHAMLIBSocketStateChanged(QAbstractSocket::SocketState socketState);
void ConnecttoHAMLIB();
void dostartTimer(int Time);
void dostopTimer();
void doHLSetPTT(int c);
void readPendingDatagrams();
void socketError();
private:
QTcpServer* tcpServer;
QTcpSocket* tcpClient;
QTcpSocket* tcpServerConnection;
int bytesToWrite;
int bytesWritten;
int bytesReceived;
int TotalBytes;
int PayloadSize;
};
class workerThread : public QThread
{
Q_OBJECT
signals:
void updateDCD(int, int);
void sendtoTrace(char *, int);
void sendtoKISS(void *, unsigned char *, int);
void openSockets();
private:
void run();
public:
};