Browse files

wireless_serial: Fixed a bug with the red LED that was making it turn…

… off while the RX line was still being held low.
  • Loading branch information...
1 parent 27a1643 commit 2387ee5e8e2562f851c397a9b87ca3fbe0a06d05 @DavidEGrayson DavidEGrayson committed Jun 18, 2011
Showing with 10 additions and 3 deletions.
  1. +10 −3 apps/wireless_serial/wireless_serial.c
View
13 apps/wireless_serial/wireless_serial.c
@@ -134,7 +134,7 @@ void updateLeds()
errorOccurredRecently = 0;
}
- LED_RED(errorOccurredRecently);
+ LED_RED(errorOccurredRecently || uartRxDisabled);
}
/* Returns the logical values of the input control signal pins.
@@ -225,9 +225,16 @@ void errorService()
}
}
- if (framingErrorActive && isPinHigh(17))
+ if (framingErrorActive)
{
- framingErrorActive = 0;
+ if (!isPinHigh(17))
+ {
+ errorOccurred();
+ }
+ else
+ {
+ framingErrorActive = 0;
+ }
}
if (uartRxDisabled)

0 comments on commit 2387ee5

Please sign in to comment.