case SR_CONF_VDIV:
bind_enum(name, key, gvar_list, print_vdiv);
break;
+
+ case SR_CONF_VOLTAGE_THRESHOLD:
+ bind_enum(name, key, gvar_list, print_voltage_threshold);
+ break;
}
if (gvar_list)
return QString(sr_voltage_string(p, q));
}
+QString DeviceOptions::print_voltage_threshold(GVariant *const gvar)
+{
+ gdouble lo, hi;
+ char buf[64];
+ g_variant_get(gvar, "(dd)", &lo, &hi);
+ snprintf(buf, sizeof(buf), "L<%.1fV H>%.1fV", lo, hi);
+ return QString(buf);
+}
+
} // binding
} // prop
} // pv
static QString print_timebase(GVariant *const gvar);
static QString print_vdiv(GVariant *const gvar);
+ static QString print_voltage_threshold(GVariant *const gvar);
protected:
struct sr_dev_inst *const _sdi;