From b9f966dd89a3f955ccab1dc4c75260a75629af2a Mon Sep 17 00:00:00 2001 From: RedHawk Date: Sat, 13 May 2023 02:04:39 +0300 Subject: [PATCH] relay: [#9] Small fixes. *Task function now actually gets executed. *Power modes now work properly. --- source/shoh/src/threads/relay/Relay.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/shoh/src/threads/relay/Relay.cpp b/source/shoh/src/threads/relay/Relay.cpp index 0f90beb..a8733b0 100644 --- a/source/shoh/src/threads/relay/Relay.cpp +++ b/source/shoh/src/threads/relay/Relay.cpp @@ -129,12 +129,12 @@ void Relay::utilizeEventData() pm = POWER_3; } - if (diff >= 5) + else if (diff >= 5) { pm = POWER_2; } - if (diff >= 1) + else if (diff >= 1) { pm = POWER_1; } @@ -147,4 +147,5 @@ void thread_relay(void * pvParams) { ThreadCommon::CommonManagers * manager = static_cast(pvParams); Relay r(manager->qm); + r.taskFunction(); }