From 3044205b9aeabb90757c6030f2dc4bcfd1c322bf Mon Sep 17 00:00:00 2001 From: Justin Fichtner <justin.fichtner@lakeshore.com> Date: ćšć, 30 11æ 2017 08:16:06 +0800 Subject: [PATCH] Implement condition register in Questionable register set --- libscpi/src/units.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libscpi/src/units.c b/libscpi/src/units.c index 9fc2072..3274205 100644 --- a/libscpi/src/units.c +++ b/libscpi/src/units.c @@ -248,7 +248,7 @@ /* Temperature */ {/* name */ "CEL", /* unit */ SCPI_UNIT_CELSIUS, /* mult */ 1}, #if USE_UNITS_IMPERIAL - {/* name */ "FAR", /* unit */ SCPI_UNIT_FAGRENHEIT, /* mult */ 1}, + {/* name */ "FAR", /* unit */ SCPI_UNIT_FAHRENHEIT, /* mult */ 1}, #endif /* USE_UNITS_IMPERIAL */ {/* name */ "K", /* unit */ SCPI_UNIT_KELVIN, /* mult */ 1}, #endif /* USE_UNITS_TEMPERATURE */ @@ -355,7 +355,7 @@ return FALSE; } - value->value *= unitDef->mult; + value->content.value *= unitDef->mult; value->unit = unitDef->unit; return TRUE; @@ -426,23 +426,23 @@ switch (param.type) { case SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA: - SCPI_ParamToDouble(context, ¶m, &(value->value)); + SCPI_ParamToDouble(context, ¶m, &(value->content.value)); break; case SCPI_TOKEN_HEXNUM: - SCPI_ParamToDouble(context, ¶m, &(value->value)); + SCPI_ParamToDouble(context, ¶m, &(value->content.value)); break; case SCPI_TOKEN_OCTNUM: - SCPI_ParamToDouble(context, ¶m, &(value->value)); + SCPI_ParamToDouble(context, ¶m, &(value->content.value)); break; case SCPI_TOKEN_BINNUM: - SCPI_ParamToDouble(context, ¶m, &(value->value)); + SCPI_ParamToDouble(context, ¶m, &(value->content.value)); break; case SCPI_TOKEN_DECIMAL_NUMERIC_PROGRAM_DATA_WITH_SUFFIX: scpiLex_DecimalNumericProgramData(&state, &token); scpiLex_WhiteSpace(&state, &token); scpiLex_SuffixProgramData(&state, &token); - SCPI_ParamToDouble(context, ¶m, &(value->value)); + SCPI_ParamToDouble(context, ¶m, &(value->content.value)); result = transformNumber(context, token.ptr, token.len, value); break; @@ -454,7 +454,7 @@ result = SCPI_ParamToChoice(context, &token, special, &tag); value->special = TRUE; - value->tag = tag; + value->content.tag = tag; break; default: @@ -482,7 +482,7 @@ } if (value->special) { - if (SCPI_ChoiceToName(special, value->tag, &type)) { + if (SCPI_ChoiceToName(special, value->content.tag, &type)) { strncpy(str, type, len); result = SCPIDEFINE_strnlen(str, len - 1); str[result] = '\0'; @@ -493,7 +493,7 @@ } } - result = SCPI_DoubleToStr(value->value, str, len); + result = SCPI_DoubleToStr(value->content.value, str, len); if (result + 1 < len) { unit = translateUnitInverse(context->units, value->unit); -- Gitblit v1.9.1