From 0c7f101ad0e43c33e8dd1b53f6f6746652236b63 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: ćšć, 27 8æ 2015 23:41:03 +0800 Subject: [PATCH] Update travis script and add build icon to README --- libscpi/src/ieee488.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/libscpi/src/ieee488.c b/libscpi/src/ieee488.c index 7b9bd9c..0593d23 100644 --- a/libscpi/src/ieee488.c +++ b/libscpi/src/ieee488.c @@ -212,7 +212,7 @@ scpi_result_t SCPI_CoreEse(scpi_t * context) { int32_t new_ESE; if (SCPI_ParamInt(context, &new_ESE, TRUE)) { - SCPI_RegSet(context, SCPI_REG_ESE, new_ESE); + SCPI_RegSet(context, SCPI_REG_ESE, (scpi_reg_val_t)new_ESE); } return SCPI_RES_OK; } @@ -250,10 +250,14 @@ * @return */ scpi_result_t SCPI_CoreIdnQ(scpi_t * context) { - SCPI_ResultMnemonic(context, context->idn[0]); - SCPI_ResultMnemonic(context, context->idn[1]); - SCPI_ResultMnemonic(context, context->idn[2]); - SCPI_ResultMnemonic(context, context->idn[3]); + int i; + for (i = 0; i<4; i++) { + if (context->idn[i]) { + SCPI_ResultMnemonic(context, context->idn[i]); + } else { + SCPI_ResultMnemonic(context, "0"); + } + } return SCPI_RES_OK; } @@ -298,7 +302,7 @@ scpi_result_t SCPI_CoreSre(scpi_t * context) { int32_t new_SRE; if (SCPI_ParamInt(context, &new_SRE, TRUE)) { - SCPI_RegSet(context, SCPI_REG_SRE, new_SRE); + SCPI_RegSet(context, SCPI_REG_SRE, (scpi_reg_val_t)new_SRE); } return SCPI_RES_OK; } @@ -329,11 +333,8 @@ * @return */ scpi_result_t SCPI_CoreTstQ(scpi_t * context) { - int result = 0; - if (context && context->interface && context->interface->test) { - result = context->interface->test(context); - } - SCPI_ResultInt(context, result); + (void) context; + SCPI_ResultInt(context, 0); return SCPI_RES_OK; } -- Gitblit v1.9.1