diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-11-18 21:57:07 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-11-18 21:57:07 +0100 |
commit | a531b10c8f67d5492efb7e3f6fc43d2200cf579f (patch) | |
tree | 4572817dc06e1b15d328405058895a531a24221d | |
parent | 96c740e045fd516a539b821ec82d10007b533bd8 (diff) | |
download | onkyo-ri-a531b10c8f67d5492efb7e3f6fc43d2200cf579f.tar.gz onkyo-ri-a531b10c8f67d5492efb7e3f6fc43d2200cf579f.tar.xz onkyo-ri-a531b10c8f67d5492efb7e3f6fc43d2200cf579f.zip |
removed unnecessary check
-rw-r--r-- | onkyo_ri.pde | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/onkyo_ri.pde b/onkyo_ri.pde index 3fa2808..9f8c607 100644 --- a/onkyo_ri.pde +++ b/onkyo_ri.pde @@ -70,8 +70,8 @@ bool inRange(int value, int expected) { int getPulseLengthInRange(int expected) { int length = getPulseLength(); - if (!inRange(length, expected)) { - length = 0; + if (length <= 0 || !inRange(length, expected)) { + return 0; } return length; |