]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/protocol.c
scpi-pps: Change some floats to doubles.
[libsigrok.git] / src / hardware / scpi-pps / protocol.c
index 4c7a649cda1f2aec73c8756b69b6af82123c3d10..5afaa5e9743d20fc87f108a6d6eee25d28fc9ccf 100644 (file)
@@ -67,7 +67,7 @@ SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data)
        struct sr_scpi_dev_inst *scpi;
        struct pps_channel *pch;
        const struct channel_spec *ch_spec;
-       float f;
+       double d;
        int cmd;
 
        (void)fd;
@@ -82,7 +82,7 @@ SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data)
        scpi = sdi->conn;
 
        /* Retrieve requested value for this state. */
-       if (sr_scpi_get_float(scpi, NULL, &f) == SR_OK) {
+       if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
                pch = devc->cur_channel->priv;
                ch_spec = &devc->device->channels[pch->hw_output_idx];
                packet.type = SR_DF_ANALOG;
@@ -106,7 +106,7 @@ SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data)
                        analog.spec->spec_digits = ch_spec->power[3];
                }
                analog.meaning->mqflags = SR_MQFLAG_DC;
-               analog.data = &f;
+               analog.data = &d;
                sr_session_send(sdi, &packet);
                g_slist_free(analog.meaning->channels);
        }