From cb0fde96fd2a026d7d5ee8420b55fa535372e077 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 23 Feb 2015 21:39:29 +0100 Subject: [PATCH] wrong logical polarity fixed --- src/hmi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hmi.cpp b/src/hmi.cpp index 95c27c3..0aaff5f 100644 --- a/src/hmi.cpp +++ b/src/hmi.cpp @@ -23,9 +23,9 @@ public: switch (m_state) { case 0: if (P2IN & m_bit) { - m_cnt++; - } else { m_cnt = 0; + } else { + m_cnt++; } if (m_cnt > 100) { m_state = 1; @@ -38,9 +38,9 @@ public: break; case 2: if (P2IN & m_bit) { - m_cnt = 0; - } else { m_cnt++; + } else { + m_cnt = 0; } if (m_cnt > 20) { m_state = 0;