X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Fanalog.c;h=fbc41d88ffa9e52e1f010fcd705aeca52b203f16;hb=f774095496a5ab9b68ce79503ae7d45f717c0006;hp=286c50be9768d2c37ae58fddaed081acde25df05;hpb=ba7dd8bbb8168cba432a844259a3e239aa5f36d7;p=libsigrok.git diff --git a/output/analog.c b/output/analog.c index 286c50be..fbc41d88 100644 --- a/output/analog.c +++ b/output/analog.c @@ -178,6 +178,15 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) case SR_UNIT_WATT_HOUR: si_printf(value, out, "Wh"); break; + case SR_UNIT_METER_SECOND: + si_printf(value, out, "m/s"); + break; + case SR_UNIT_HECTOPASCAL: + si_printf(value, out, "hPa"); + break; + case SR_UNIT_HUMIDITY_293K: + si_printf(value, out, "%rF"); + break; default: si_printf(value, out, ""); break; @@ -206,8 +215,8 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) g_string_append_c(out, '\n'); } -static int receive(struct sr_output *o, const struct sr_dev_inst *sdi, - const struct sr_datafeed_packet *packet, GString **out) +static int receive(struct sr_output *o, const struct sr_datafeed_packet *packet, + GString **out) { const struct sr_datafeed_analog *analog; struct sr_channel *ch; @@ -215,8 +224,6 @@ static int receive(struct sr_output *o, const struct sr_dev_inst *sdi, const float *fdata; int i, p; - (void)sdi; - *out = NULL; if (!o || !o->sdi) return SR_ERR_ARG; @@ -264,7 +271,6 @@ static int cleanup(struct sr_output *o) SR_PRIV struct sr_output_format output_analog = { .id = "analog", .description = "Analog data", - .df_type = SR_DF_ANALOG, .init = init, .receive = receive, .cleanup = cleanup