changeset 291:dd97e75620a7

fc-tmsync: ttr-all implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 18 Nov 2017 06:47:38 +0000
parents 94234e9c843b
children 0af5009bd52f
files rvinterf/etmsync/l1tmcmd.c rvinterf/etmsync/tmscmdtab.c
diffstat 2 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/etmsync/l1tmcmd.c	Sat Nov 18 06:35:13 2017 +0000
+++ b/rvinterf/etmsync/l1tmcmd.c	Sat Nov 18 06:47:38 2017 +0000
@@ -239,3 +239,25 @@
 	write_tx_ramp(ramp_data, stdout);
 	return(0);
 }
+
+cmd_ttr_all(argc, argv)
+	char **argv;
+{
+	u_char table[512];
+	int rc, i;
+	FILE *of;
+
+	for (i = 0; i < 16; i++) {
+		rc = do_ttr(i, table + i * 32);
+		if (rc)
+			return(rc);
+	}
+	of = fopen(argv[1], "w");
+	if (!of) {
+		perror(argv[1]);
+		return(ERROR_UNIX);
+	}
+	write_tx_ramps_table(table, of);
+	fclose(of);
+	return(0);
+}
--- a/rvinterf/etmsync/tmscmdtab.c	Sat Nov 18 06:35:13 2017 +0000
+++ b/rvinterf/etmsync/tmscmdtab.c	Sat Nov 18 06:47:38 2017 +0000
@@ -14,6 +14,7 @@
 extern int cmd_rftr();
 extern int cmd_tms();
 extern int cmd_ttr();
+extern int cmd_ttr_all();
 
 extern int get_pirelli_imei();
 
@@ -29,5 +30,6 @@
 	{"rftr", 1, 2, cmd_rftr},
 	{"tms", 1, 1, cmd_tms},
 	{"ttr", 1, 1, cmd_ttr},
+	{"ttr-all", 1, 1, cmd_ttr_all},
 	{0, 0, 0, 0}
 };