Fix some magic numbers in gyro board code.
Were causing it not to clear interrupts properly.
Also added new constants for recalibrated photosensor and
reenabled gyro-sensor-receiver.
diff --git a/gyro_board/src/usb/encoder.c b/gyro_board/src/usb/encoder.c
index f5ca745..df1031f 100644
--- a/gyro_board/src/usb/encoder.c
+++ b/gyro_board/src/usb/encoder.c
@@ -89,7 +89,7 @@
// Apparently, this handler runs regardless of a match or capture event.
if (TIM2->IR & (1 << 4)) {
// Capture
- TIM2->IR = (1 << 3); // Clear the interrupt.
+ TIM2->IR = (1 << 4); // Clear the interrupt.
shooter_cycle_ticks = TIM2->CR0;
@@ -325,7 +325,7 @@
// Third robot shooter.
static void ShooterPhotoFall(void) {
- GPIOINT->IO0IntClr = (1 << 23);
+ GPIOINT->IO0IntClr = (1 << 4);
// We reset TC to make sure we don't get a crap
// value from CR0 when the capture interrupt occurs
// if the shooter is just starting up again, and so