Fix ExitAirTempSensor calculation

When calculating maxRPM, variables tachMaxPercent and tachMinPercent
are in percentage. Both tachMaxReading and tachMinReading are already
specified as percentage in configuration file.

When cfm is less than 50% of QMin, exit air temp formula does not
work correctly. Make exit air temp not available.

Use steady_clock to ensure time elapsed is non-negative.

Increase the error print count to 5 during exit air temp computation.
This change allows power reading related error messages to be logged
in addition to fan sensor reading errors during same computation cycle.

This patch also includes minor clean up that moves powerReading
to private member.

Tested:
Before the change, exit air temp reports critical event occasionally on power up.
Examples:
Exit_Air_Temp sensor crossed a critical high threshold going high. Reading=13938.000000 Threshold=85.000000
Exit_Air_Temp sensor crossed a critical low threshold going low. Reading=-119240.000000 Threshold=0.000000

Same AC cycle test was run with the change, the issue is resolved.

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Idf9c2aa916ac741ff047c5baea51a664c101c33d
2 files changed
tree: 270d0ce81a75ee6a9cf05d5920985b1b3daf4a98
  1. include/
  2. service_files/
  3. src/
  4. tests/
  5. .clang-format
  6. .clang-ignore
  7. .clang-tidy
  8. .gitignore
  9. Jenkinsfile
  10. LICENSE
  11. MAINTAINERS
  12. meson.build
  13. meson_options.txt
  14. README.md
README.md

dbus-sensors

dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.

key features

  • runtime re-configurable from d-bus (entity-manager or the like)

  • isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible

  • async single-threaded: uses sdbusplus/asio bindings

  • multiple data inputs: hwmon, d-bus, direct driver access

sensor documentation