From a2e83e5ff635f040cffe4c12cfdaa60fa320c3de Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 22 4月 2015 01:59:50 +0800 Subject: [PATCH] Make public SCPI_LongToStr, SCPI_DoubleToStr --- examples/test-interactive/main.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/test-interactive/main.c b/examples/test-interactive/main.c index ac23a48..2aabd1a 100644 --- a/examples/test-interactive/main.c +++ b/examples/test-interactive/main.c @@ -52,7 +52,7 @@ int SCPI_Error(scpi_t * context, int_fast16_t err) { (void) context; - fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int32_t) err, SCPI_ErrorTranslate(err)); + fprintf(stderr, "**ERROR: %d, \"%s\"\r\n", (int16_t) err, SCPI_ErrorTranslate(err)); return 0; } @@ -65,12 +65,9 @@ return SCPI_RES_OK; } -/** - * Return 0 as OK and other number as error - */ scpi_result_t SCPI_Test(scpi_t * context) { fprintf(stderr, "**Test\r\n"); - return 0; + return SCPI_RES_OK; } scpi_result_t SCPI_Reset(scpi_t * context) { @@ -95,7 +92,9 @@ printf("SCPI Interactive demo\r\n"); char smbuffer[10]; while (1) { - fgets(smbuffer, 10, stdin); + if (NULL == fgets(smbuffer, 10, stdin)) { + break; + } SCPI_Input(&scpi_context, smbuffer, strlen(smbuffer)); } -- Gitblit v1.9.1