@@ -3,7 +3,7 @@
struct usData_t usData[2];
void us_0_isr() {
- if(digitalRead(US_RX_0_PIN) && usData[1].state == rxPending) {
+ if(digitalRead(US_RX_0_PIN) && usData[0].state == rxPending) {
usData[0].pulseStart = TCNT1;
usData[0].state = counting;
} else if(usData[0].state == counting) {