SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET,
SR_CONF_OVER_TEMPERATURE_PROTECTION | SR_CONF_GET,
SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE | SR_CONF_GET,
+ SR_CONF_UNDER_VOLTAGE_CONDITION | SR_CONF_GET,
+ SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE | SR_CONF_GET,
};
SR_PRIV struct sr_dev_driver arachnid_labs_re_load_pro_driver_info;
case SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE:
*data = g_variant_new_boolean(devc->otp_active);
break;
+ case SR_CONF_UNDER_VOLTAGE_CONDITION:
+ *data = g_variant_new_boolean(TRUE); /* Always on. */
+ break;
+ case SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE:
+ *data = g_variant_new_boolean(devc->uvc_active);
+ break;
default:
return SR_ERR_NA;
}
devc = sdi->priv;
if (g_str_has_prefix((const char *)devc->buf, "overtemp")) {
- sr_dbg("Overtemperature condition!");
+ sr_warn("Overtemperature condition!");
devc->otp_active = TRUE;
return;
}
+ if (g_str_has_prefix((const char *)devc->buf, "undervolt")) {
+ sr_warn("Undervoltage condition!");
+ devc->uvc_active = TRUE;
+ return;
+ }
+
if (!g_str_has_prefix((const char *)devc->buf, "read ")) {
sr_dbg("Unknown packet: '%s'.", devc->buf);
return;