FreeCalypso > hg > fc-rfcal-tools
changeset 130:634995d55601
fc-cmu200d power-meas: propagate ramp status from the instrument
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 20 Dec 2021 02:36:02 +0000 |
parents | 6cccdafcd64d |
children | 8e26cb57c7f8 |
files | cmu200/rfanalyzer.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cmu200/rfanalyzer.c Mon Dec 20 02:24:55 2021 +0000 +++ b/cmu200/rfanalyzer.c Mon Dec 20 02:36:02 2021 +0000 @@ -129,7 +129,7 @@ cmd_power_meas() { - char *resp_fields[5]; + char *resp_fields[5], *ramp_status; char client_resp[128]; if (current_mode != OP_MODE_GSM_RFAN) { @@ -143,7 +143,13 @@ ("-CMU200 response has wrong number of fields\n"); return(0); } - sprintf(client_resp, "+ %s\n", resp_fields[4]); + if (!strcasecmp(resp_fields[3], "MATC")) + ramp_status = "OK"; + else if (!strcasecmp(resp_fields[3], "NMAT")) + ramp_status = "BAD"; + else + ramp_status = resp_fields[3]; + sprintf(client_resp, "+ %s %s\n", resp_fields[4], ramp_status); send_socket_response(client_resp); return(0); }