comparison cmu200/vcxocal.c @ 11:aeffe53e110d

fc-cmu200d: freq-meas works
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 May 2017 19:22:11 +0000
parents c873a36a16e6
children 34c6fbe38daa
comparison
equal deleted inserted replaced
10:34a66394bea0 11:aeffe53e110d
49 return(0); 49 return(0);
50 } 50 }
51 51
52 cmd_freq_meas() 52 cmd_freq_meas()
53 { 53 {
54 char *resp_fields[11];
55 char client_resp[128];
56
54 if (current_mode != OP_MODE_VCXO_CAL) { 57 if (current_mode != OP_MODE_VCXO_CAL) {
55 send_socket_response("-Wrong mode\n"); 58 send_socket_response("-Wrong mode\n");
56 return(0); 59 return(0);
57 } 60 }
58 send_scpi_cmd("READ:MOD?\n"); 61 send_scpi_cmd("READ:MOD?\n");
59 collect_instr_response(); 62 collect_instr_response();
60 /* response parsing and freq offset extraction to be implemented */ 63 if (parse_commasep_response(resp_fields, 11) < 0) {
61 send_socket_response("+ TBD\n"); 64 send_socket_response
65 ("-CMU200 response has wrong number of fields\n");
66 return(0);
67 }
68 sprintf(client_resp, "+ %s\n", resp_fields[7]);
69 send_socket_response(client_resp);
62 return(0); 70 return(0);
63 } 71 }