grove.py icon indicating copy to clipboard operation
grove.py copied to clipboard

grove_gesture_sensor.py differs from Arduino C Code

Open pezi opened this issue 4 years ago • 0 comments

https://github.com/Seeed-Studio/grove.py/blob/master/grove/grove_gesture_sensor.py

		if data0 != 0x20  :#or data1 <> 0x76:
			print("Error with sensor")
		

Only one byte is checked - second check is commted out. Why?

if data == self.GES_FORWARD_FLAG:
				return 1
				time.sleep(self.GES_QUIT_TIME) 

Multiple dead code statments after return?

 } else if (data == GES_FORWARD_FLAG) {
                    Serial.println("Forward");
                    delay(GES_QUIT_TIME);
}

pezi avatar Mar 06 '21 17:03 pezi