From 5e29fa0737e2de22a74f0c0232a8f3a1101abc0a Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 22 Dec 2012 20:47:27 +0000 Subject: [PATCH] [arm] Custom Switches duration was never working! --- src/open9x.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/open9x.cpp b/src/open9x.cpp index 0e37b631c..1d0488c87 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -861,9 +861,9 @@ bool __getSwitch(int8_t swtch) } } if (cs->duration) { - if (result) { - if (durations[cs_idx] < get_tmr10ms()) { - result = false; + if (!result) { + if (durations[cs_idx] > get_tmr10ms()) { + result = true; if (cs->delay) delays[cs_idx] = get_tmr10ms() + (cs->delay*50); } }