break;
case SR_CONF_AVG_SAMPLES:
- bind_int(name, "", "", pair<int64_t, int64_t>(0, INT32_MAX), get, set);
+ if (capabilities.count(Capability::LIST))
+ bind_enum(name, "", key, capabilities, get, set, print_averages);
+ else
+ bind_int(name, "", "", pair<int64_t, int64_t>(0, INT32_MAX), get, set);
break;
default:
return QString("%1x").arg(factor);
}
+QString Device::print_averages(Glib::VariantBase gvar)
+{
+ uint64_t avg;
+ avg = g_variant_get_uint64(gvar.gobj());
+ return QString("%1").arg(avg);
+}
+
} // namespace binding
} // namespace pv
static QString print_vdiv(Glib::VariantBase gvar);
static QString print_voltage_threshold(Glib::VariantBase gvar);
static QString print_probe_factor(Glib::VariantBase gvar);
+ static QString print_averages(Glib::VariantBase gvar);
protected:
shared_ptr<sigrok::Configurable> configurable_;