FreeCalypso > hg > fc-rfcal-tools
diff autocal/txchkmain.c @ 71:784ce9f3a80a
fc-rfcal-txcheck: spec and error values added to the output
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Jul 2017 06:58:36 +0000 |
parents | b313884c79fd |
children |
line wrap: on
line diff
--- a/autocal/txchkmain.c Fri Jul 14 05:03:10 2017 +0000 +++ b/autocal/txchkmain.c Fri Jul 14 06:58:36 2017 +0000 @@ -19,11 +19,12 @@ unsigned default_arfcn; unsigned start_plnum; unsigned end_plnum; + int spec_max_dbm; } bands[] = { - {"850", RFPW_STD_BAND_850, 190, 5, 19}, - {"900", RFPW_STD_BAND_900, 40, 5, 19}, - {"1800", RFPW_STD_BAND_1800, 700, 0, 15}, - {"1900", RFPW_STD_BAND_1900, 660, 0, 15}, + {"850", RFPW_STD_BAND_850, 190, 5, 19, 33}, + {"900", RFPW_STD_BAND_900, 40, 5, 19, 33}, + {"1800", RFPW_STD_BAND_1800, 700, 0, 15, 30}, + {"1900", RFPW_STD_BAND_1900, 660, 0, 15, 30}, {0, 0, 0} }; static struct band *selected_band; @@ -60,6 +61,7 @@ { unsigned plnum; double meas; + int spec_dbm; socket_pathname_options(argc, argv); finish_cmdline(argc, argv); @@ -78,12 +80,15 @@ printf("Starting RF Tx on the DUT\n"); do_rfe(RX_TX_TCH); + spec_dbm = selected_band->spec_max_dbm; for (plnum = selected_band->start_plnum; - plnum <= selected_band->end_plnum; plnum++) { + plnum <= selected_band->end_plnum; plnum++, spec_dbm -= 2) { do_txpw(TX_PWR_LEVEL, plnum); usleep(20000); meas = tx_power_meas(); - printf("Tx power level #%u: %.2f dBm\n", plnum, meas); + printf( + "Tx power level #%u: spec %d dBm, meas %.2f dBm (%+.2f)\n", + plnum, spec_dbm, meas, meas - spec_dbm); } printf("Stopping RF Tx on the DUT\n");