From c07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 15:43:52 +0200 Subject: Imported Upstream version 1.6.3 --- spectro/hcfr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'spectro/hcfr.c') diff --git a/spectro/hcfr.c b/spectro/hcfr.c index 9ec6be9..c67a419 100644 --- a/spectro/hcfr.c +++ b/spectro/hcfr.c @@ -78,7 +78,7 @@ hcfr_command( ) { int rv, se; - if ((se = p->icom->write_read(p->icom, in, out, bsize, '\n', 1, to)) != 0) { + if ((se = p->icom->write_read(p->icom, in, out, bsize, "\n", 1, to)) != 0) { int ec; a1logd(p->log, 1, "hcfr_command: serial i/o failure on write_read '%s'\n",icoms_fix(in)); return hcfr_interp_code((inst *)p, icoms2hcfr_err(se)); @@ -370,6 +370,9 @@ hcfr_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { if (p->icom->port_type(p->icom) != icomt_usb) { a1logd(p->log, 1, "hcfr_init_coms: expect hcfr to be USB\n"); return hcfr_interp_code((inst *)p, HCFR_UNKNOWN_MODEL); + } else { + a1logd(p->log, 1, "hcfr_init_coms: wrong communications type for device!\n"); + return inst_coms_fail; } /* Set config, interface, "Serial" write & read end points */ @@ -530,8 +533,8 @@ double mtx[3][3] icmSetUnity3x3(p->ccmat); } else { if (p->cbid == 0) { - a1loge(p->log, 1, "hcfr: can't set col_cor_mat over non base display type\n"); - inst_wrong_setup; + a1loge(p->log, 1, "hcfr: can't set col_cor_mat over non-base display type\n"); + return inst_wrong_setup; } icmCpy3x3(p->ccmat, mtx); } -- cgit v1.2.3