IRQ_UNLOCK(flags);
}
-static volatile uint8_t lcob_seen = I2C_COB_NONE, rcob_seen = I2C_COB_NONE;
+static volatile uint8_t lcob_seen = I2C_COB_NONE;
+static volatile uint8_t rcob_seen = I2C_COB_NONE;
uint8_t cob_detect_left(void)
{
else
lcob_seen = I2C_COB_BLACK;
IRQ_UNLOCK(flags);
+ if (l_cpt_on > l_cpt_off)
+ DEBUG(E_USER_SENSOR, "left white %d %d",
+ l_cpt_on, l_cpt_off);
+ else
+ DEBUG(E_USER_SENSOR, "left black %d %d",
+ l_cpt_on, l_cpt_off);
}
}
else
rcob_seen = I2C_COB_BLACK;
IRQ_UNLOCK(flags);
+
+ if (r_cpt_on > r_cpt_off)
+ DEBUG(E_USER_SENSOR, "right white %d %d",
+ r_cpt_on, r_cpt_off);
+ else
+ DEBUG(E_USER_SENSOR, "right black %d %d",
+ r_cpt_on, r_cpt_off);
}
}