From 372bc0de04b3e148180bb9c94e56cee7de17dcf5 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 9 Dec 2022 22:06:57 -0500 Subject: [PATCH] add start and stop transmit --- cubesatsim/play_pwm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cubesatsim/play_pwm.cpp b/cubesatsim/play_pwm.cpp index d761fedf..8281016b 100644 --- a/cubesatsim/play_pwm.cpp +++ b/cubesatsim/play_pwm.cpp @@ -116,7 +116,6 @@ int led_pin = LED_BUILTIN; pwm_set_gpio_level(dds_pwm_pin, upper); sstv_micro_timer = micros(); - if (octet == end_flag[flag_count]) { // looking for end flag // if (end_flag_detected) { flag_count++; @@ -214,6 +213,9 @@ int led_pin = LED_BUILTIN; sstv_micro_timer = micros(); + digitalWrite(PTT_PIN, LOW); // start transmit + + // Serial.printf("PWM config.top: %d\n", dds_pwm_config.top); // delay(1000); @@ -235,6 +237,8 @@ int led_pin = LED_BUILTIN; // i.close(); Serial.printf("\nResult: %d count: %d", finished, index1); + digitalWrite(PTT_PIN, HIGH); // stop transmit + // return(finished); return; }