# HG changeset patch # User Mychaela Falconia # Date 1639974139 0 # Node ID c99b1dce04ecc04025be4013c1b85c4dd93696cf # Parent 94e8a410d6bde4866bee8148a30aac3caa2940f1 fc-rfcal-txcheck: check and report ramp tolerance diff -r 94e8a410d6bd -r c99b1dce04ec autocal/txpwrmeas.c --- a/autocal/txpwrmeas.c Mon Dec 20 03:52:01 2021 +0000 +++ b/autocal/txpwrmeas.c Mon Dec 20 04:22:19 2021 +0000 @@ -2,8 +2,10 @@ * This module contains the Tx power measurement function. */ +#include #include #include +#include extern char tsid_response[]; @@ -37,3 +39,31 @@ meas = atof(tsid_response + 1); return(meas); } + +double +tx_power_meas_ramp(rstat) + char **rstat; +{ + double meas; + char *cp; + + tsid_command("power-meas ramp\n"); + for (cp = tsid_response + 1; isspace(*cp); cp++) + ; + if (!*cp) { +inv: fprintf(stderr, + "error: bad TSID response to power-meas ramp\n"); + exit(ERROR_RFTEST); + } + meas = atof(cp); + while (*cp && !isspace(*cp)) + cp++; + if (!*cp) + goto inv; + while (isspace(*cp)) + cp++; + if (!*cp) + goto inv; + *rstat = cp; + return(meas); +} diff -r 94e8a410d6bd -r c99b1dce04ec autocal/txstandchk.c --- a/autocal/txstandchk.c Mon Dec 20 03:52:01 2021 +0000 +++ b/autocal/txstandchk.c Mon Dec 20 04:22:19 2021 +0000 @@ -13,7 +13,7 @@ #include #include "stdband.h" -extern double tx_power_meas(); +extern double tx_power_meas(), tx_power_meas_ramp(); static struct band { char *name; @@ -64,6 +64,7 @@ unsigned plnum; double meas; int spec_dbm; + char *ramp_status; socket_pathname_options(argc, argv); finish_cmdline(argc, argv); @@ -88,10 +89,10 @@ do_txpw(TX_PWR_LEVEL, plnum); pass_pcl_to_tester(plnum); usleep(20000); - meas = tx_power_meas(); + meas = tx_power_meas_ramp(&ramp_status); printf( - "Tx power level #%u: spec %d dBm, meas %.2f dBm (%+.2f)\n", - plnum, spec_dbm, meas, meas - spec_dbm); + "Tx power level #%u: spec %d dBm, meas %.2f dBm (%+.2f), ramp %s\n", + plnum, spec_dbm, meas, meas - spec_dbm, ramp_status); } printf("Stopping RF Tx on the DUT\n");