devc = g_malloc0(sizeof(struct dev_context));
g_mutex_init(&devc->rw_mutex);
devc->current_limit = 0;
- devc->voltage_limit = 0;
+ devc->uvc_threshold = 0;
devc->running = FALSE;
devc->load_activated = FALSE;
sr_sw_limits_init(&devc->limits);
if (ret < 0) {
sr_warn("Could not receive message!");
ret = SR_ERR;
- } else if (0 == ret) {
+ } else if (ret == 0) {
sr_warn("No message received!");
ret = SR_ERR;
}
*data = g_variant_new_double(fvalue);
return ret;
case SR_CONF_UNDER_VOLTAGE_CONDITION_THRESHOLD:
- ret = ebd_get_voltage_limit(sdi, &fvalue);
+ ret = ebd_get_uvc_threshold(sdi, &fvalue);
if (ret == SR_OK)
*data = g_variant_new_double(fvalue);
return ret;
value = g_variant_get_double(data);
if (value < 0.0 || value > 21.0)
return SR_ERR_ARG;
- return ebd_set_voltage_limit(sdi, value);
+ return ebd_set_uvc_threshold(sdi, value);
default:
return SR_ERR_NA;
}
switch (key) {
case SR_CONF_SCAN_OPTIONS:
case SR_CONF_DEVICE_OPTIONS:
- return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
+ return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts,
+ devopts);
case SR_CONF_CURRENT_LIMIT:
*data = std_gvar_min_max_step(0.0, 4.0, 0.001);
break;
if (sdi) {
devc = sdi->priv;
- if (devc->load_activated) {
+ if (devc->load_activated)
ebd_loadtoggle(sdi->conn, devc);
- }
ebd_stop(sdi->conn, devc);
}