comparison autocal/gmagicmain.c @ 50:d309241fcae3

fc-rfcal-gmagic ready to test
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 27 May 2017 07:33:39 +0000
parents 5018fd8eecce
children fe39aac56cde
comparison
equal deleted inserted replaced
49:1a0dbc746d57 50:d309241fcae3
62 } 62 }
63 63
64 main(argc, argv) 64 main(argc, argv)
65 char **argv; 65 char **argv;
66 { 66 {
67 int pm, Gmagic;
68 char Gmagic_db[64];
69
67 socket_pathname_options(argc, argv); 70 socket_pathname_options(argc, argv);
68 finish_cmdline(argc, argv); 71 finish_cmdline(argc, argv);
69 connect_rvinterf_socket(); 72 connect_rvinterf_socket();
70 connect_tsid_socket(); 73 connect_tsid_socket();
71 setlinebuf(stdout); /* to allow logging with tee */ 74 setlinebuf(stdout); /* to allow logging with tee */
73 76
74 printf("Putting the DUT into Test Mode\n"); 77 printf("Putting the DUT into Test Mode\n");
75 do_tms(1); 78 do_tms(1);
76 do_rfpw(STD_BAND_FLAG, selected_band->rfpw_std_band); 79 do_rfpw(STD_BAND_FLAG, selected_band->rfpw_std_band);
77 l1tm_setup_for_rxcal(); 80 l1tm_setup_for_rxcal();
78 81 pm = rx_measure(arfcn);
79 82 Gmagic = pm - RXCAL_SIGGEN_LEVEL - RXCAL_AGC_DB * 2;
83 halfdb_to_string(Gmagic, Gmagic_db);
84 printf("GMagic=%d (%s dB)\n", Gmagic, Gmagic_db);
85 exit(0);
80 } 86 }