changeset 38:8877634feba5

fc-cmu200d: use either main or Aux Tx
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 27 May 2017 02:10:29 +0000
parents 498b90f6e224
children 34c6fbe38daa
files cmu200/mode.c cmu200/signalgen.c
diffstat 2 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/cmu200/mode.c	Sat May 27 01:58:06 2017 +0000
+++ b/cmu200/mode.c	Sat May 27 02:10:29 2017 +0000
@@ -12,9 +12,3 @@
 {
 	current_mode = OP_MODE_UNDEF;
 }
-
-stop_signal_gen()
-{
-	if (current_mode == OP_MODE_SIGNAL_GEN)
-		send_scpi_cmd("ABORT:RFG\n");
-}
--- a/cmu200/signalgen.c	Sat May 27 01:58:06 2017 +0000
+++ b/cmu200/signalgen.c	Sat May 27 02:10:29 2017 +0000
@@ -9,11 +9,24 @@
 #include "mode.h"
 #include "secaddr.h"
 
+extern char *cmu200_tx_name;
+extern int cmu200_rf_port;
+
 extern char *client_cmd_fields[];
 extern int client_cmd_nfields;
 
 extern int current_mode;
 
+stop_signal_gen()
+{
+	char cmdstr[80];
+
+	if (current_mode == OP_MODE_SIGNAL_GEN) {
+		sprintf(cmdstr, "ABORT:RFG:%s\n", cmu200_tx_name);
+		send_scpi_cmd(cmdstr);
+	}
+}
+
 cmd_signal_gen_setup()
 {
 	int rc;
@@ -58,11 +71,13 @@
 	}
 	offset = atoi(client_cmd_fields[2]);
 	freq_khz += offset;
-	sprintf(cmdstr, "SOUR:RFG:LEV %s\n", client_cmd_fields[3]);
+	sprintf(cmdstr, "SOUR:RFG:%s:LEV %s\n", cmu200_tx_name,
+		client_cmd_fields[3]);
 	send_scpi_cmd(cmdstr);
-	sprintf(cmdstr, "SOUR:RFG:FREQ %u000\n", freq_khz);
+	sprintf(cmdstr, "SOUR:RFG:%s:FREQ %u000\n", cmu200_tx_name, freq_khz);
 	send_scpi_cmd(cmdstr);
-	send_scpi_cmd("INIT:RFG\n");
+	sprintf(cmdstr, "INIT:RFG:%s\n", cmu200_tx_name);
+	send_scpi_cmd(cmdstr);
 	send_scpi_cmd("*OPC?\n");
 	collect_staropc_response();
 	send_socket_response("+OK\n");