comparison autocal/txstandchk.c @ 133:c99b1dce04ec default tip

fc-rfcal-txcheck: check and report ramp tolerance
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 20 Dec 2021 04:22:19 +0000
parents 94e8a410d6bd
children
comparison
equal deleted inserted replaced
132:94e8a410d6bd 133:c99b1dce04ec
11 #include <unistd.h> 11 #include <unistd.h>
12 #include <rvinterf/l1tm.h> 12 #include <rvinterf/l1tm.h>
13 #include <rvinterf/exitcodes.h> 13 #include <rvinterf/exitcodes.h>
14 #include "stdband.h" 14 #include "stdband.h"
15 15
16 extern double tx_power_meas(); 16 extern double tx_power_meas(), tx_power_meas_ramp();
17 17
18 static struct band { 18 static struct band {
19 char *name; 19 char *name;
20 unsigned rfpw_std_band; 20 unsigned rfpw_std_band;
21 unsigned default_arfcn; 21 unsigned default_arfcn;
62 char **argv; 62 char **argv;
63 { 63 {
64 unsigned plnum; 64 unsigned plnum;
65 double meas; 65 double meas;
66 int spec_dbm; 66 int spec_dbm;
67 char *ramp_status;
67 68
68 socket_pathname_options(argc, argv); 69 socket_pathname_options(argc, argv);
69 finish_cmdline(argc, argv); 70 finish_cmdline(argc, argv);
70 connect_rvinterf_socket(); 71 connect_rvinterf_socket();
71 connect_tsid_socket(); 72 connect_tsid_socket();
86 for (plnum = selected_band->start_plnum; 87 for (plnum = selected_band->start_plnum;
87 plnum <= selected_band->end_plnum; plnum++, spec_dbm -= 2) { 88 plnum <= selected_band->end_plnum; plnum++, spec_dbm -= 2) {
88 do_txpw(TX_PWR_LEVEL, plnum); 89 do_txpw(TX_PWR_LEVEL, plnum);
89 pass_pcl_to_tester(plnum); 90 pass_pcl_to_tester(plnum);
90 usleep(20000); 91 usleep(20000);
91 meas = tx_power_meas(); 92 meas = tx_power_meas_ramp(&ramp_status);
92 printf( 93 printf(
93 "Tx power level #%u: spec %d dBm, meas %.2f dBm (%+.2f)\n", 94 "Tx power level #%u: spec %d dBm, meas %.2f dBm (%+.2f), ramp %s\n",
94 plnum, spec_dbm, meas, meas - spec_dbm); 95 plnum, spec_dbm, meas, meas - spec_dbm, ramp_status);
95 } 96 }
96 97
97 printf("Stopping RF Tx on the DUT\n"); 98 printf("Stopping RF Tx on the DUT\n");
98 do_rfe(STOP_ALL); 99 do_rfe(STOP_ALL);
99 exit(0); 100 exit(0);