summaryrefslogtreecommitdiffstats
path: root/control
diff options
context:
space:
mode:
Diffstat (limited to 'control')
-rwxr-xr-xcontrol/gen-fan-zone-defs.py6
-rw-r--r--control/types.hpp3
-rw-r--r--control/zone.cpp6
3 files changed, 7 insertions, 8 deletions
diff --git a/control/gen-fan-zone-defs.py b/control/gen-fan-zone-defs.py
index e5aa39b..0ddfb63 100755
--- a/control/gen-fan-zone-defs.py
+++ b/control/gen-fan-zone-defs.py
@@ -127,7 +127,7 @@ def getActions(edata, actions, events):
param = (
"Timer{static_cast<std::chrono::seconds>(" +
str(eActions[p]['delay']) + "), " +
- "util::Timer::TimerType::" +
+ "TimerType::" +
str(eActions[p]['type']) + "}")
else:
param += (str(eActions[p]['type']).lower() + ">(")
@@ -257,7 +257,7 @@ def getEvent(zone_num, zone_conditions, e, events_data):
else:
timer['interval'] = (interval +
"(" + str(0) + ")")
- timer['type'] = "util::Timer::TimerType::repeating"
+ timer['type'] = "TimerType::repeating"
event['timer'] = timer
return event
@@ -409,7 +409,7 @@ def addPrecondition(zNum, zCond, event, events_data):
else:
timer['interval'] = (interval +
"(" + str(0) + ")")
- timer['type'] = "util::Timer::TimerType::repeating"
+ timer['type'] = "TimerType::repeating"
precond['pctime'] = timer
return precond
diff --git a/control/types.hpp b/control/types.hpp
index bb9367b..f565333 100644
--- a/control/types.hpp
+++ b/control/types.hpp
@@ -64,8 +64,9 @@ using Service = std::tuple<std::string, bool>;
constexpr auto intervalPos = 0;
constexpr auto typePos = 1;
+using TimerType = phosphor::fan::util::Timer::TimerType;
using Timer = std::tuple<std::chrono::seconds,
- util::Timer::TimerType>;
+ TimerType>;
constexpr auto sigMatchPos = 0;
constexpr auto sigHandlerPos = 1;
diff --git a/control/zone.cpp b/control/zone.cpp
index 0050899..11246db 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -73,8 +73,7 @@ Zone::Zone(Mode mode,
// Start timer for fan speed decreases
if (!_decTimer.running() && _decInterval != seconds::zero())
{
- _decTimer.start(_decInterval,
- util::Timer::TimerType::repeating);
+ _decTimer.start(_decInterval, TimerType::repeating);
}
}
}
@@ -245,8 +244,7 @@ void Zone::requestSpeedIncrease(uint64_t targetDelta)
}
setSpeed(requestTarget);
// Start timer countdown for fan speed increase
- _incTimer.start(_incDelay,
- util::Timer::TimerType::oneshot);
+ _incTimer.start(_incDelay, TimerType::oneshot);
}
}
OpenPOWER on IntegriCloud