commit | 9154caabf34d0dc26bddf9507913f2b752800f51 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Thu Dec 02 02:28:54 2021 -0800 |
committer | Willy Tu <wltu@google.com> | Wed Nov 16 05:30:43 2022 +0000 |
tree | 76b1a66dda4616fcfa4b6e962b374b31703b4280 | |
parent | 0679e4b174822cd5801f320f631b2f4aa45debed [diff] |
sensordatahandler: clamp the values instead of removing the sensor Clamping the sensor values to prevent sensors from going missing. Based on https://github.com/openbmc/phosphor-host-ipmid/blob/5aae092cab08279d45c7914c466314b356164b7c/dbus-sdr/sensorutils.cpp#L258-L304 Clamping the threshold value to correct the result of negative threshold value. Tested: Set 'sensorUnits1: 0x80' in config for sensor cpu0_abcd_cur which has low threshold -1 and high threshold 7.6. Before: ~# ipmitool sensor | grep cpu0_abcd_cur cpu0_abcd_cur | 0.022 | Amps | ok | na | 4.020 | 4.020 | 7.587 | 7.587 | na After: ~# ipmitool sensor | grep cpu0_abcd_cur cpu0_abcd_cur | -0.135 | Amps | ok | na | -0.998 | -0.998 | 7.587 | 7.587 | na Change-Id: Ie5af79ccbe8ab9660755f1c9d281e49a08d01309 Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: JeffLin <JeffLin2@quantatw.com> Signed-off-by: Willy Tu <wltu@google.com>
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage