FreeCalypso > hg > fc-rfcal-tools
annotate autocal/txstandbas.c @ 118:6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 13 Feb 2018 07:17:31 +0000 |
parents | c9bd1f75029f |
children |
rev | line source |
---|---|
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
73
c9bd1f75029f
autocal: C main modules for standalone programs renamed more sensibly
Mychaela Falconia <falcon@freecalypso.org>
parents:
56
diff
changeset
|
2 * fc-rfcal-txbasis is a debug utility implementing just one part |
c9bd1f75029f
autocal: C main modules for standalone programs renamed more sensibly
Mychaela Falconia <falcon@freecalypso.org>
parents:
56
diff
changeset
|
3 * of the fc-rfcal-txband process in a standalone manner; |
c9bd1f75029f
autocal: C main modules for standalone programs renamed more sensibly
Mychaela Falconia <falcon@freecalypso.org>
parents:
56
diff
changeset
|
4 * this module contains the main() function for this standalone utlity. |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 */ |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdio.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <stdlib.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <string.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include <strings.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include <unistd.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include <rvinterf/l1tm.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include <rvinterf/exitcodes.h> |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 #include "stdband.h" |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
15 #include "txvout.h" |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 extern char *rvif_socket_pathname, *tsid_socket_pathname; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 extern double tx_power_meas(); |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
20 extern vout_t dbm_to_vout(); |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 static struct band { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 char *name; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 unsigned rfpw_std_band; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 unsigned default_arfcn; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 } bands[] = { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 {"850", RFPW_STD_BAND_850, 190}, |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 {"900", RFPW_STD_BAND_900, 40}, |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 {"1800", RFPW_STD_BAND_1800, 700}, |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 {"1900", RFPW_STD_BAND_1900, 660}, |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 {0, 0, 0} |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 }; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 static struct band *selected_band; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 static unsigned arfcn, arfcn_set; |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
35 static int do_slope; |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 cmdline_options(argc, argv) |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 char **argv; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 extern char *optarg; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 int c; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
43 while ((c = getopt(argc, argv, "a:ls:t:")) != EOF) { |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 switch (c) { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 case 'a': |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 arfcn = atoi(optarg); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 arfcn_set = 1; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 continue; |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
49 case 'l': |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
50 do_slope = 1; |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
51 continue; |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 case 's': |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 rvif_socket_pathname = optarg; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 continue; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 case 't': |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 tsid_socket_pathname = optarg; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 continue; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 case '?': |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 default: |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 /* error msg already printed */ |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 exit(ERROR_USAGE); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 return(0); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 select_band(bandname) |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 char *bandname; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 struct band *band; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 for (band = bands; band->name; band++) |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 if (!strcmp(band->name, bandname)) |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 break; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 if (!band->name) { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 fprintf(stderr, "error: \"%s\" is not a known band\n", |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 bandname); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 exit(ERROR_USAGE); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 selected_band = band; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 if (!arfcn_set) |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 arfcn = band->default_arfcn; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 return(0); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 main(argc, argv) |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 char **argv; |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 extern int optind; |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
90 int apc, apc_prev; |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 double meas; |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
92 vout_t vout, vout_prev; |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
93 int nanflag = 0, first; |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 cmdline_options(argc, argv); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 if (argc - optind < 2) { |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 fprintf(stderr, "usage: %s band apc...\n", argv[0]); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 exit(ERROR_USAGE); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 select_band(argv[optind++]); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 connect_rvinterf_socket(); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 connect_tsid_socket(); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 setlinebuf(stdout); /* to allow logging with tee */ |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 printf("Preparing RF test system for %s MHz Tx calibration\n", |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 selected_band->name); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 do_txpwr_cal_setup(selected_band->name, arfcn); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 printf("Putting the DUT into Test Mode\n"); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 do_tms(1); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 do_rfpw(STD_BAND_FLAG, selected_band->rfpw_std_band); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 do_rfpw(TCH_ARFCN, arfcn); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 do_rfpw(AFC_ENA_FLAG, 0); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 printf("Starting RF Tx on the DUT\n"); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 do_rfe(RX_TX_TCH); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
117 for (first = 1; optind < argc; optind++) { |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 apc = atoi(argv[optind]); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 do_txpw(TX_APC_DAC, apc); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 usleep(20000); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 meas = tx_power_meas(); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 printf("APC DAC=%d: %.2f dBm\n", apc, meas); |
118
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
123 if (isnan(meas)) |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
124 nanflag = 1; |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
125 if (do_slope && !nanflag) { |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
126 vout = dbm_to_vout(meas); |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
127 if (!first) |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
128 printf("slope=%f\n", |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
129 (vout - vout_prev) / (apc - apc_prev)); |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
130 apc_prev = apc; |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
131 vout_prev = vout; |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
132 } |
6a7f8d201859
fc-rfcal-txbasis: added -l option to show slope (check linearity)
Mychaela Falconia <falcon@freecalypso.org>
parents:
73
diff
changeset
|
133 first = 0; |
56
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 } |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 printf("Stopping RF Tx on the DUT\n"); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 do_rfe(STOP_ALL); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 exit(0); |
df827df6db82
fc-rfcal-txbasis written, ready to test
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 } |