Arnaud VALLEY / Mbed 2 deprecated Pinscape_Controller_V2_arnoz

Dependencies:   mbed FastIO FastPWM USBDevice

Revision:
109:310ac82cbbee
Parent:
107:8f3c7aeae7e0
Child:
111:42dc75fbe623
--- a/main.cpp	Tue Feb 18 21:33:30 2020 +0000
+++ b/main.cpp	Sat Apr 18 19:08:55 2020 +0000
@@ -4780,8 +4780,11 @@
                 if ((cfg.IRCommand[i].flags & IRFlagTVON) != 0)
                 {
                     // It's a TV ON command - check if it's the one we're
-                    // looking for.
-                    if (n == tvon_ir_state)
+                    // looking for.  We can match any code starting at the
+                    // current state.  (We ignore codes BEFORE the current
+                    // state, because we've already processed them on past
+                    // iterations.)
+                    if (n >= tvon_ir_state)
                     {
                         // It's the one.  Start transmitting it by
                         // pushing its virtual button.