hwmonio:: Add Interface base class and tests
Enable injecting hwmonio::HwmonIO mocks for testing.
Tested: Ran on quanta-q71l and saw all sensors exported to dbus as
expected with the expected values.
Change-Id: I35912bf2a733932d9e1e774ff53b0114ae16560b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/fan_pwm.cpp b/fan_pwm.cpp
index cf89552..9b43b17 100644
--- a/fan_pwm.cpp
+++ b/fan_pwm.cpp
@@ -26,7 +26,7 @@
std::string empty;
//Write target out to sysfs
try {
- ioAccess.write(
+ ioAccess->write(
value,
type,
id,
@@ -45,7 +45,7 @@
WriteFailure::CALLOUT_DEVICE_PATH(devPath.c_str()));
auto file = sysfs::make_sysfs_path(
- ioAccess.path(),
+ ioAccess->path(),
type,
id,
empty);