From 5b71cf894ba524f9399f04cc81451fe5ad73f2b3 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 9 Mar 2025 14:44:16 +0100 Subject: [PATCH] remove test mode from modulator --- src/dcf95.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/dcf95.c b/src/dcf95.c index 43a3f58..840ad12 100644 --- a/src/dcf95.c +++ b/src/dcf95.c @@ -430,21 +430,7 @@ int main(int argc, char **argv) { // Get base carrier signal float carrier = get_oscillator_sin_sample(&osc); - // Process in test mode or normal mode - if (test_mode) { - // In test mode, generate a repeating pattern regardless of time - int cycle_position = elapsed_samples % bit_samples; - int test_bit = (elapsed_samples / bit_samples) % 2; // Alternate 0 and 1 - - if ((test_bit == 0 && cycle_position < pulse_0_samples) || - (test_bit == 1 && cycle_position < pulse_1_samples)) { - // Reduced amplitude during pulse - output[i] = carrier * master_volume * REDUCED_AMPLITUDE; - } else { - // Full amplitude otherwise - output[i] = carrier * master_volume; - } - } else if (transmitting) { + if (transmitting) { // Calculate milliseconds within the current second ms_within_second = (int)((elapsed_samples * 1000.0) / sample_rate);