]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/api.c
Only save enabled channels to a session file.
[libsigrok.git] / src / hardware / scpi-pps / api.c
index b62574e2abbb02492e8305f8aaad18139c97efac..c8070a063335538109aaa278ae96f4a112e9e7ae 100644 (file)
@@ -30,9 +30,8 @@ static const uint32_t scanopts[] = {
        SR_CONF_SERIALCOMM,
 };
 
-static const uint32_t devopts_driver[] = {
+static const uint32_t drvopts[] = {
        SR_CONF_POWER_SUPPLY,
-       SR_CONF_CONTINUOUS,
 };
 
 static struct pps_channel_instance pci[] = {
@@ -90,7 +89,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                return NULL;
        }
 
-       sdi = sr_dev_inst_new();
+       sdi = g_malloc0(sizeof(struct sr_dev_inst));
        sdi->status = SR_ST_ACTIVE;
        sdi->vendor = g_strdup(vendor);
        sdi->model = g_strdup(hw_info->model);
@@ -434,7 +433,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                return SR_OK;
        } else if (key == SR_CONF_DEVICE_OPTIONS && !sdi) {
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               devopts_driver, ARRAY_SIZE(devopts_driver), sizeof(uint32_t));
+                               drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
                return SR_OK;
        }