X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Farachnid-labs-re-load-pro%2Fapi.c;h=fb6f82727dedd9eafe515a5b27310bed96c6075d;hb=695aeaf7392e5d4a6186861520df15a3ec7e4b0d;hp=5cef7758314bda6cc5f56702e326874a5dbf5753;hpb=2153093941bf74b642d187552e16deb3315e1627;p=libsigrok.git diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c index 5cef7758..fb6f8272 100644 --- a/src/hardware/arachnid-labs-re-load-pro/api.c +++ b/src/hardware/arachnid-labs-re-load-pro/api.c @@ -99,8 +99,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) if (serial_open(serial, SERIAL_RDWR) != SR_OK) return NULL; - serial_flush(serial); - /* * First stop potentially running monitoring and wait for 50ms before * next command can be sent. @@ -247,12 +245,8 @@ static int config_get(uint32_t key, GVariant **data, *data = g_variant_new_boolean(devc->otp_active); break; case SR_CONF_UNDER_VOLTAGE_CONDITION: - if (reloadpro_get_under_voltage_threshold(sdi, &fvalue) == SR_OK) { - if (fvalue == .0) - *data = g_variant_new_boolean(FALSE); - else - *data = g_variant_new_boolean(TRUE); - } + if (reloadpro_get_under_voltage_threshold(sdi, &fvalue) == SR_OK) + *data = g_variant_new_boolean(fvalue != 0.0); break; case SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE: *data = g_variant_new_boolean(devc->uvc_active); @@ -351,7 +345,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) g_mutex_clear(&devc->acquisition_mutex); return ret; - } static struct sr_dev_driver arachnid_labs_re_load_pro_driver_info = {