"Output channel regulation", NULL},
{SR_CONF_OVER_TEMPERATURE_PROTECTION, SR_T_BOOL, "otp",
"Over-temperature protection", NULL},
- {SR_CONF_OUTPUT_FREQUENCY, SR_T_UINT64, "output_frequency",
+ {SR_CONF_OUTPUT_FREQUENCY, SR_T_FLOAT, "output_frequency",
"Output frequency", NULL},
{SR_CONF_MEASURED_QUANTITY, SR_T_STRING, "measured_quantity",
"Measured quantity", NULL},
#define PACKET_SIZE 17
-static const uint64_t frequencies[] = {
+static const double frequencies[] = {
100, 120, 1000, 10000, 100000, 0,
};
static int send_freq_update(struct sr_dev_inst *sdi, unsigned int freq)
{
return do_config_update(sdi, SR_CONF_OUTPUT_FREQUENCY,
- g_variant_new_uint64(frequencies[freq]));
+ g_variant_new_double(frequencies[freq]));
}
static int send_quant1_update(struct sr_dev_inst *sdi, unsigned int quant)
switch (key) {
case SR_CONF_OUTPUT_FREQUENCY:
- *data = g_variant_new_uint64(frequencies[devc->freq]);
+ *data = g_variant_new_double(frequencies[devc->freq]);
break;
case SR_CONF_MEASURED_QUANTITY:
*data = g_variant_new_string(quantities1[devc->quant1]);
switch (key) {
case SR_CONF_OUTPUT_FREQUENCY:
- *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT64,
- frequencies, ARRAY_SIZE(frequencies), sizeof(uint64_t));
+ *data = g_variant_new_fixed_array(G_VARIANT_TYPE_DOUBLE,
+ frequencies, ARRAY_SIZE(frequencies), sizeof(double));
break;
case SR_CONF_MEASURED_QUANTITY:
*data = g_variant_new_strv(list_quantities1,