diff options
Diffstat (limited to 'occ_manager.cpp')
-rw-r--r-- | occ_manager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/occ_manager.cpp b/occ_manager.cpp index 42b6390..67e96a6 100644 --- a/occ_manager.cpp +++ b/occ_manager.cpp @@ -108,6 +108,7 @@ void Manager::initStatusObjects() static_assert(sizeof(DEV_PATH) != 0); auto deviceNames = i2c_occ::getOccHwmonDevices(DEV_PATH); + auto occMasterName = deviceNames.front(); for (auto& name : deviceNames) { i2c_occ::i2cToDbus(name); @@ -120,6 +121,11 @@ void Manager::initStatusObjects() path.c_str(), *this)); } + // The first device is master occ + pcap = std::make_unique<open_power::occ::powercap::PowerCap>( + bus, + *statusObjects.front(), + occMasterName); } #endif |