summaryrefslogtreecommitdiff
path: root/Modulate.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2024-10-29 22:45:21 +0000
committerDave Hibberd <hibby@debian.org>2024-10-29 22:45:21 +0000
commitd0709a1e0a04bf74f240dc0fdb8697f030b68cea (patch)
tree93074377abcd3abd699660485d4ecf350f480b72 /Modulate.c
parentb1d1488de60dfff8b89872f863098a884133852f (diff)
New upstream version 0.0.0.73~rc1upstream/0.0.0.73_rc1
Diffstat (limited to 'Modulate.c')
-rw-r--r--Modulate.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/Modulate.c b/Modulate.c
index 86900e3..0eb5f11 100644
--- a/Modulate.c
+++ b/Modulate.c
@@ -1025,6 +1025,34 @@ void sendCWID(char * strID, BOOL CWOnOff, int Chan)
initFilter(200, Filter, Chan);
+ // if sending 1500 cal tone send mark tone for 10 secs
+
+ if (strcmp(strID, "1500TONE") == 0)
+ {
+ float m_amplitude = 30000.0f;
+ float m_frequency = 1500.0f;
+ float m_phase = 0.0;
+ float m_time = 0.0;
+ float m_deltaTime = 1.0f / 12000;
+
+ float x;
+ // generate sin wave in mono
+ for (int sample = 0; sample < 120000; ++sample)
+ {
+ x = m_amplitude * sin(2 * M_PI * m_frequency * m_time + m_phase);
+ ARDOPSampleSink(x);
+ m_time += m_deltaTime;
+ }
+
+
+ ARDOPTXPtr[Chan] = 0;
+ ARDOPTXLen[Chan] = Number;
+ Number = 0;
+
+ return;
+
+ }
+
//Generate leader for VOX 6 dots long
for (k = 6; k >0; k--)