summaryrefslogtreecommitdiff
path: root/Modulate.c
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
committerDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
commit3cdcbeea3e2891f4a10c79b272da144f37ff24f3 (patch)
treedc2daaabc2ba68cc125fc21bd35f8e67bdb0499e /Modulate.c
parentf7fc865d93f8448779d320ce152f0fa44a64fcad (diff)
New upstream version 0.67upstream/0.67
Diffstat (limited to 'Modulate.c')
-rw-r--r--Modulate.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/Modulate.c b/Modulate.c
index 5eb8522..1f996db 100644
--- a/Modulate.c
+++ b/Modulate.c
@@ -5,7 +5,9 @@
#define ARDOPBufferSize 12000 * 100
-extern short ARDOPTXBuffer[4][12000 * 100]; // Enough to hold whole frame of samples
+extern char CWIDMark[32];
+
+extern short ARDOPTXBuffer[4][ARDOPBufferSize]; // Enough to hold whole frame of samples
extern int ARDOPTXLen[4]; // Length of frame
extern int ARDOPTXPtr[4]; // Tx Pointer
@@ -966,7 +968,7 @@ void sendCWID(char * strID, BOOL CWOnOff, int Chan)
0x557, 0x155, 0x755, 0x1DD5, 0x7775, 0x1DDDD, 0x1D57, 0x1D57};
- float dblHiPhaseInc = 2 * M_PI * 1609.375f / 12000; // 1609.375 Hz High tone
+ float dblHiPhaseInc = 2 * M_PI * 1509.375f / 12000; // 1609.375 Hz High tone
float dblLoPhaseInc = 2 * M_PI * 1390.625f / 12000; // 1390.625 low tone
float dblHiPhase = 0;
float dblLoPhase = 0;
@@ -978,6 +980,23 @@ void sendCWID(char * strID, BOOL CWOnOff, int Chan)
char * index;
int intMask;
int idoffset;
+ int Filter = 1500;
+
+ if (CWIDMark[0])
+ {
+ // Want nonstandard tones
+
+ float Mark = atof(CWIDMark);
+ float Space = Mark - 200;
+
+ dblHiPhaseInc = 2 * M_PI * Mark / 12000; // 1609.375 Hz High tone
+ dblLoPhaseInc = 2 * M_PI * Space / 12000; // 1390.625 low tone
+
+ if (CWOnOff)
+ Filter = Mark;
+ else
+ Filter = (Mark + Space) / 2;
+ }
strlop(strID, '-'); // Remove any SSID
@@ -1000,8 +1019,12 @@ void sendCWID(char * strID, BOOL CWOnOff, int Chan)
dblLoPhase -= 2 * M_PI;
}
- initFilter(500,1500, Chan);
-
+ if (CWOnOff)
+ initFilter(500, Filter, Chan);
+ else
+ initFilter(200, Filter, Chan);
+
+
//Generate leader for VOX 6 dots long
for (k = 6; k >0; k--)