diff options
Diffstat (limited to 'monitor/main.cpp')
-rw-r--r-- | monitor/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/monitor/main.cpp b/monitor/main.cpp index 060f27a..84dd7d1 100644 --- a/monitor/main.cpp +++ b/monitor/main.cpp @@ -72,6 +72,16 @@ int main(int argc, char* argv[]) for (const auto& fanDef : fanDefinitions) { + // Check if a condition exists on the fan + auto condition = std::get<conditionField>(fanDef); + if (condition) + { + // Condition exists, skip adding fan if it fails + if (!(*condition)(bus)) + { + continue; + } + } fans.emplace_back(std::make_unique<Fan>( mode, bus, eventPtr, trust, fanDef)); } |