summaryrefslogtreecommitdiff
path: root/spectro/hcfr.c
diff options
context:
space:
mode:
Diffstat (limited to 'spectro/hcfr.c')
-rw-r--r--spectro/hcfr.c9
1 files changed, 6 insertions, 3 deletions
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);
}