libsigrok.h: Add Joule, Coulomb, and Ah units.
Also extend a comment on energy in comparison to power.
This commit is contained in:
parent
82ff704449
commit
fe8c5aef1f
|
@ -294,7 +294,7 @@ enum sr_unit {
|
||||||
SR_UNIT_VOLT_AMPERE,
|
SR_UNIT_VOLT_AMPERE,
|
||||||
/** Real power [W]. */
|
/** Real power [W]. */
|
||||||
SR_UNIT_WATT,
|
SR_UNIT_WATT,
|
||||||
/** Consumption [Wh]. */
|
/** Energy (consumption) in watt hour [Wh]. */
|
||||||
SR_UNIT_WATT_HOUR,
|
SR_UNIT_WATT_HOUR,
|
||||||
/** Wind speed in meters per second. */
|
/** Wind speed in meters per second. */
|
||||||
SR_UNIT_METER_SECOND,
|
SR_UNIT_METER_SECOND,
|
||||||
|
@ -328,6 +328,12 @@ enum sr_unit {
|
||||||
SR_UNIT_TOLA,
|
SR_UNIT_TOLA,
|
||||||
/** Pieces (number of items). */
|
/** Pieces (number of items). */
|
||||||
SR_UNIT_PIECE,
|
SR_UNIT_PIECE,
|
||||||
|
/** A relative unit of (power) measurement [dB]. */
|
||||||
|
SR_UNIT_JOULE,
|
||||||
|
/** Electric charge in coulomb. */
|
||||||
|
SR_UNIT_COULOMB,
|
||||||
|
/** Electric charge in ampere hour [Ah]. */
|
||||||
|
SR_UNIT_AMPERE_HOUR,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update unit_strings[] (analog.c) and fancyprint() (output/analog.c)
|
* Update unit_strings[] (analog.c) and fancyprint() (output/analog.c)
|
||||||
|
|
|
@ -88,6 +88,9 @@ static struct unit_mq_string unit_strings[] = {
|
||||||
{ SR_UNIT_MOMME, "momme" },
|
{ SR_UNIT_MOMME, "momme" },
|
||||||
{ SR_UNIT_TOLA, "tola" },
|
{ SR_UNIT_TOLA, "tola" },
|
||||||
{ SR_UNIT_PIECE, "pcs" },
|
{ SR_UNIT_PIECE, "pcs" },
|
||||||
|
{ SR_UNIT_JOULE, "J" },
|
||||||
|
{ SR_UNIT_COULOMB, "C" },
|
||||||
|
{ SR_UNIT_AMPERE_HOUR, "Ah" },
|
||||||
ALL_ZERO
|
ALL_ZERO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue