qsrv: avoid sending 0 precision w/ integer value
This commit is contained in:
+3
-4
@@ -315,9 +315,6 @@ void getProperties(dbChannel* pChannel, db_field_log *pfl, Value& node)
|
||||
if(auto units = node["display.units"])
|
||||
units = meta.units;
|
||||
}
|
||||
if(options & DBR_PRECISION) {
|
||||
// TODO: add in nt.cpp?
|
||||
}
|
||||
if(options & DBR_ENUM_STRS) {
|
||||
if(auto choices = node["value.choices"]) {
|
||||
shared_array<std::string> arr(meta.no_str);
|
||||
@@ -331,7 +328,9 @@ void getProperties(dbChannel* pChannel, db_field_log *pfl, Value& node)
|
||||
if(options & DBR_GR_DOUBLE) {
|
||||
dlL = meta.lower_disp_limit;
|
||||
node["display.limitHigh"] = meta.upper_disp_limit;
|
||||
node["display.precision"] = meta.precision.dp;
|
||||
if(options & DBR_PRECISION) {
|
||||
node["display.precision"] = int32_t(meta.precision.dp);
|
||||
}
|
||||
}
|
||||
if(options & DBR_CTRL_DOUBLE) {
|
||||
node["control.limitLow"] = meta.lower_ctrl_limit;
|
||||
|
||||
@@ -289,7 +289,6 @@ void testGetScalar()
|
||||
"display.limitHigh int32_t = 0\n"
|
||||
"display.description string = \"\"\n"
|
||||
"display.units string = \"\"\n"
|
||||
"display.precision int32_t = 0\n"
|
||||
"display.form.index int32_t = 0\n"
|
||||
"display.form.choices string[] = {7}[\"Default\", \"String\", \"Binary\", \"Decimal\", \"Hex\", \"Exponential\", \"Engineering\"]\n"
|
||||
"control.limitLow int32_t = 0\n"
|
||||
@@ -404,7 +403,6 @@ void testGetArray()
|
||||
"display.limitHigh int32_t = 0\n"
|
||||
"display.description string = \"\"\n"
|
||||
"display.units string = \"\"\n"
|
||||
"display.precision int32_t = 0\n"
|
||||
"display.form.index int32_t = 0\n"
|
||||
"display.form.choices string[] = {7}[\"Default\", \"String\", \"Binary\", \"Decimal\", \"Hex\", \"Exponential\", \"Engineering\"]\n"
|
||||
"control.limitLow int32_t = 0\n"
|
||||
@@ -536,7 +534,6 @@ void testGetPut64()
|
||||
"display.limitHigh uint64_t = 0\n"
|
||||
"display.description string = \"\"\n"
|
||||
"display.units string = \"\"\n"
|
||||
"display.precision int32_t = 0\n"
|
||||
"display.form.index int32_t = 0\n"
|
||||
"display.form.choices string[] = {7}[\"Default\", \"String\", \"Binary\", \"Decimal\", \"Hex\", \"Exponential\", \"Engineering\"]\n"
|
||||
"control.limitLow uint64_t = 0\n"
|
||||
|
||||
Reference in New Issue
Block a user