From 14184131ba863121ac0cda5d8cacfd9a18643fae Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Fri, 19 May 2017 14:37:30 -0500 Subject: Only setup set speed events when not init mode Change-Id: Ia6987295a3eb4e23b9d6ae13a383e440386572de Signed-off-by: Matthew Barth --- control/zone.hpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'control/zone.hpp') diff --git a/control/zone.hpp b/control/zone.hpp index d8f3fe4..1a4e173 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -12,6 +12,17 @@ namespace fan namespace control { +/** + * The mode fan control will run in: + * - init - only do the initialization steps + * - control - run normal control algorithms + */ +enum class Mode +{ + init, + control +}; + /** * @class Represents a fan control zone, which is a group of fans * that behave the same. @@ -32,10 +43,12 @@ class Zone * Creates the appropriate fan objects based on * the zone definition data passed in. * + * @param[in] mode - mode of fan control * @param[in] bus - the dbus object * @param[in] def - the fan zone definition data */ - Zone(sdbusplus::bus::bus& bus, + Zone(Mode mode, + sdbusplus::bus::bus& bus, const ZoneDefinition& def); /** -- cgit v1.2.1