FreeCalypso > hg > fc-rfcal-tools
changeset 58:46c72323182a
autocal/rxband.c: do_gmagic() factored out of main()
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 27 May 2017 23:17:14 +0000 |
parents | 2588f9eed11a |
children | c87067884da7 |
files | autocal/rxband.c |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/autocal/rxband.c Sat May 27 23:05:28 2017 +0000 +++ b/autocal/rxband.c Sat May 27 23:17:14 2017 +0000 @@ -104,9 +104,6 @@ main(argc, argv) char **argv; { - int pm, Gmagic; - char Gmagic_db[64]; - socket_pathname_options(argc, argv); finish_cmdline(argc, argv); connect_rvinterf_socket(); @@ -119,9 +116,19 @@ do_rfpw(STD_BAND_FLAG, rxcal_band->rfpw_std_band); l1tm_setup_for_rxcal(); + do_gmagic(); + exit(0); +} + +do_gmagic() +{ + int pm, Gmagic; + char Gmagic_db[64]; + + printf("Calibrating GMagic\n"); pm = rx_measure(rxcal_band->main_arfcn); Gmagic = pm - RXCAL_SIGGEN_LEVEL - RXCAL_AGC_DB * 2; halfdb_to_string(Gmagic, Gmagic_db); printf("GMagic=%d (%s dB)\n", Gmagic, Gmagic_db); - exit(0); + return(0); }