Hi Wolfram, On 01/01/2016 10:37 AM, Wolfram Sang wrote: > >> we just discussed this on IRC -- there is already a flag for RMS, >> shouldn't this be equivalent to effective voltage/current? > > Ah, that's how it is encoded. I was already wondering; but I searched > through the source for "effective" not for RMS. > > So, I dropped this patch and modified the following patch as below. > Is this good enough for you guys or shall I resend the whole series? > > Thanks, > > Wolfram > > From: Wolfram Sang <w...@the-dreams.de> > Date: Wed, 30 Dec 2015 14:46:08 +0100 > Subject: [PATCH v2] dmm: vc870: support effective voltage & current > > Signed-off-by: Wolfram Sang <w...@the-dreams.de> > --- > src/dmm/vc870.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/src/dmm/vc870.c b/src/dmm/vc870.c > index 125f471..549ce71 100644 > --- a/src/dmm/vc870.c > +++ b/src/dmm/vc870.c > @@ -351,6 +351,14 @@ static void handle_flags(struct sr_datafeed_analog_old > *analog, > // analog->mq = SR_MQ_FREQUENCY; > // analog->unit = SR_UNIT_HERTZ; > } > + if (info->is_v_a_eff_value) {
Might as well make this refer to RMS as well. > + analog->mqflags |= SR_MQFLAG_RMS; > + analog->mq = SR_MQ_VOLTAGE; > + analog->unit = SR_UNIT_VOLT; > + /* TODO: Handle effective current value */ > + // analog->mq = SR_MQ_CURRENT; > + // analog->unit = SR_UNIT_AMPERE; Can you get rid of these TODOs and commented code? It's ok to leave it unimplemented (open a bug about it maybe), but no need to litter the code with TODOs. Or find a handy nearby source of AC current to test against :-) thanks, -- Bert Vermeulen b...@biot.com ------------------------------------------------------------------------------ _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel