From d53d9d1ae4daf8450459d680ba7db3a71c77dd67 Mon Sep 17 00:00:00 2001 From: Jon Szymaniak Date: Wed, 18 Jun 2014 21:58:41 -0400 Subject: [PATCH] bladeRF-cli: Updated 'calibrate' help text and removed no-arg execution. --- .../utilities/bladeRF-cli/src/cmd/calibrate.c | 10 ++-------- host/utilities/bladeRF-cli/src/cmd/cmd.c | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/host/utilities/bladeRF-cli/src/cmd/calibrate.c b/host/utilities/bladeRF-cli/src/cmd/calibrate.c index c50b5759..e0f7c0b3 100644 --- a/host/utilities/bladeRF-cli/src/cmd/calibrate.c +++ b/host/utilities/bladeRF-cli/src/cmd/calibrate.c @@ -31,6 +31,7 @@ int cmd_calibrate(struct cli_state *state, int argc, char **argv) calibrate [module] */ int status = 0; + unsigned int ops = 0; int fpga_status; if (!cli_device_is_opened(state)) { @@ -47,14 +48,7 @@ int cmd_calibrate(struct cli_state *state, int argc, char **argv) } - if (argc == 1) { - - printf("TO DO - autocalibration at the current gain & freq\n"); - return 0; - - } else if (argc == 2) { - unsigned int ops = 0; - + if (argc == 2) { if (strcasecmp(argv[1], "dc_lms_tuning") == 0) { ops = CAL_DC_LMS_TUNING; } else if (strcasecmp(argv[1], "dc_lms_txlpf") == 0) { diff --git a/host/utilities/bladeRF-cli/src/cmd/cmd.c b/host/utilities/bladeRF-cli/src/cmd/cmd.c index 23dfd09d..563391bb 100644 --- a/host/utilities/bladeRF-cli/src/cmd/cmd.c +++ b/host/utilities/bladeRF-cli/src/cmd/cmd.c @@ -100,18 +100,21 @@ static const struct cmd cmd_table[] = { FIELD_INIT(.exec, cmd_calibrate), FIELD_INIT(.desc, "Calibrate transceiver"), FIELD_INIT(.help, - "calibrate []\n" + "calibrate \n" "\n" - "Calibrate the DC offset for both RX and TX\n" + "Perform the specified calibration operation." "\n" - "Available modules for calibration:\n" + "Available operations:\n" "\n" - "\ttuning\t\n" - "\ttxlpf\t\n" - "\trxlpf\t\n" - "\trxvga2\t\n" + "\tdc_lms_tuning\tDC calibration of LMS LPF Tuning\n" + "\tdc_lms_txlpf \tDC calibration of LMS TX LPF\n" + "\tdc_lms_rxlpf \tDC calibration of LMS RX LPF\n" + "\tdc_lms_rxvga2\tDC calibration of LMS RX VGA2\n" + "\tdc_lms \tDC calibration of all of the above LMS items\n" + "\tdc_rx \tDC calibration of LMS I and Q RX channels\n" + "\tdc_tx \tDC calibration of LMS I and Q TX channels\n" + "\tdc \tDC calibration of LMS I and Q RX+TX channels\n" "\n" - "Leave blank to calibrate all of the above.\n" ) }, {