hardware: fix voltage sensors reporting
As per linux sysfs documentation[1], the voltages reported by sysfs files
are in millivolts, not microvolts.
Thanks to Martin for discovering the bug.
[1]: https://github.com/torvalds/linux/blob/32b9a19a1966fb3124d7ddd60ebd08688be2f3fa/Documentation/ABI/testing/sysfs-class-hwmon#L70
Fixes: 97e5ea16
Change-Id: I1475388eb88d69a13b81b6f042c43f0b439d0732
diff --git a/src/ietf-hardware/IETFHardware.cpp b/src/ietf-hardware/IETFHardware.cpp
index 9a2edc0..c355934 100644
--- a/src/ietf-hardware/IETFHardware.cpp
+++ b/src/ietf-hardware/IETFHardware.cpp
@@ -186,14 +186,14 @@
template <> const DataTree sysfsStaticData<SensorType::VoltageAC> = {
{"class", "iana-hardware:sensor"},
{"sensor-data/value-type", "volts-AC"},
- {"sensor-data/value-scale", "micro"},
+ {"sensor-data/value-scale", "milli"},
{"sensor-data/value-precision", "0"},
{"sensor-data/oper-status", "ok"}
};
template <> const DataTree sysfsStaticData<SensorType::VoltageDC> = {
{"class", "iana-hardware:sensor"},
{"sensor-data/value-type", "volts-DC"},
- {"sensor-data/value-scale", "micro"},
+ {"sensor-data/value-scale", "milli"},
{"sensor-data/value-precision", "0"},
{"sensor-data/oper-status", "ok"}
};