From: Frank Stettner Date: Mon, 27 Jul 2020 17:55:27 +0000 (+0200) Subject: teleinfo: Fix measured quantity (energy, not power). X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f5247d953f6ba57b0cb2a4656f639898d9cfbd34;p=libsigrok.git teleinfo: Fix measured quantity (energy, not power). --- diff --git a/src/hardware/teleinfo/protocol.c b/src/hardware/teleinfo/protocol.c index c87ea8a1..1938664d 100644 --- a/src/hardware/teleinfo/protocol.c +++ b/src/hardware/teleinfo/protocol.c @@ -99,27 +99,27 @@ static void teleinfo_handle_measurement(struct sr_dev_inst *sdi, if (!strcmp(label, "ADCO")) sr_sw_limits_update_samples_read(&devc->sw_limits, 1); else if (!strcmp(label, "BASE")) - teleinfo_send_value(sdi, "BASE", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "BASE", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "HCHP")) - teleinfo_send_value(sdi, "HP" , v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HP" , v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "HCHC")) - teleinfo_send_value(sdi, "HC" , v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HC" , v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "EJPHN")) - teleinfo_send_value(sdi, "HN" , v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HN" , v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "EJPHPM")) - teleinfo_send_value(sdi, "HPM" , v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HPM" , v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "BBRHPJB")) - teleinfo_send_value(sdi, "HPJB", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HPJB", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "BBRHPJW")) - teleinfo_send_value(sdi, "HPJW", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HPJW", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "BBRHPJR")) - teleinfo_send_value(sdi, "HPJR", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HPJR", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "BBRHCJB")) - teleinfo_send_value(sdi, "HCJB", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HCJB", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "BBRHCJW")) - teleinfo_send_value(sdi, "HCJW", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HCJW", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "BBRHCJR")) - teleinfo_send_value(sdi, "HCJR", v, SR_MQ_POWER, SR_UNIT_WATT_HOUR); + teleinfo_send_value(sdi, "HCJR", v, SR_MQ_ENERGY, SR_UNIT_WATT_HOUR); else if (!strcmp(label, "IINST")) teleinfo_send_value(sdi, "IINST", v, SR_MQ_CURRENT, SR_UNIT_AMPERE); else if (!strcmp(label, "PAPP"))