I'm not a programmer, I wrote this so can someone correct the mistakes?
-------------------------------------------------------------------------------------------------------------------------
diff --git a/sbitx.c b/sbitx.c.new
index 36fac58..f05cecf 100644
--- a/sbitx.c
+++ b/sbitx.c.new
@@ -10,6 +10,7 @@
?#include <wiringSerial.h>
?#include <linux/types.h>
?#include <linux/limits.h>
+#include <sys/ioctl.h>
?#include <stdint.h>
?#include <time.h>
?#include <signal.h>
@@ -68,6 +69,8 @@ fftw_complex *fft_m;????????????????? // holds previous samples for overlap and discard convolu
?fftw_plan plan_fwd, plan_tx;
?int bfo_freq = 40035000;
?int freq_hdr = -1;
+int fd;
+int RTS_flag = TIOCM_RTS;
?
?static double volume?? = 100.0;
?static int tx_drive = 40;
@@ -1187,6 +1190,8 @@ void tr_switch_v2(int tx_on){
??????????????????????? mute_count = 20;
??????????????????????? tx_process_restart = 1;
??????????????????????? digitalWrite(TX_LINE, HIGH);
+?????????????????????? fd = open("/dev/ttyUSB_PTT",O_RDWR | O_NOCTTY );
+?????????????????????? ioctl(fd, TIOCMBIS, &RTS_flag);
?????? delay(20);
??????????????????????? set_tx_power_levels();
??????????????????????? in_tx = 1;
@@ -1212,6 +1217,8 @@ void tr_switch_v2(int tx_on){
??????????????????????? delay(10);
??????????????????????? //power down the PA chain to null any gain
??????????????????????? digitalWrite(TX_LINE, LOW);
+?????????????????????? ioctl(fd, TIOCMBIC, &RTS_flag);
+?????????????????????? close(fd);
??????????????????????? delay(5);
??????????????????????? //audio codec is back on
??????????????????????? sound_mixer(audio_card, "Master", rx_vol)
---------------------------------------------------------------------------------------------------------------------------------