]> git.tdb.fi Git - model-railway-devices.git/commitdiff
Fix a bug in interpreting Motorola commands
authorMikko Rasa <tdb@tdb.fi>
Sun, 27 Oct 2013 15:36:59 +0000 (17:36 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 27 Oct 2013 15:36:59 +0000 (17:36 +0200)
arducontrol/motorola.c

index 0ee6704ede87aaba476f2cc758223fe072d60cd6..3e1a41c6a3f6d2dbdb12aefa15cab7739ca4e938 100644 (file)
@@ -136,7 +136,7 @@ uint8_t motorola_command(const uint8_t *cmd_buf, uint8_t cmd_length)
                if(addr>80)
                        return INVALID_VALUE;
 
-               if(cmd_buf[2]&0x0E)
+               if(cmd_buf[2]&0x0C)
                        return INVALID_VALUE;
                uint8_t aux = cmd_buf[2]&0x01;