fixed wrong bit value
authorFrank DeMarco <if.self.end@gmail.com>
Fri, 12 Mar 2021 02:21:51 +0000 (21:21 -0500)
committerFrank DeMarco <if.self.end@gmail.com>
Fri, 12 Mar 2021 02:21:51 +0000 (21:21 -0500)
ir_receive.ino

index 1ea4fad..ab9c5db 100644 (file)
@@ -60,7 +60,7 @@ void extract_values_from_command(uint32_t command, uint16_t& time, int& left, in
                                  uint8_t& flip, uint8_t& repeats, uint16_t& repeat_delay, uint8_t& swap, uint8_t& chain, uint8_t& hand_command)
 {
     // use bit masking to isolate the values packed into the command
-    hand_command = (command & 0x4000000) >> 25;
+    hand_command = (command & 0x2000000) >> 25;
     chain = (command & 0x1000000) >> 24;
     swap = (command & 0x800000) >> 23;
     repeat_delay = ((command & 0x780000) >> 19) * 128;
@@ -214,6 +214,7 @@ void robot_move(uint8_t current_robot)
                                 hand.write(0);
                                 hand_state = HAND_CLOSED;
                             }
+                            delay(500);
                         }
                     }
                 }