Mike Moore
/
RTOS_HW_04
RTOS homework 4
Diff: main.cpp
- Revision:
- 5:faa6d8a04501
- Parent:
- 4:67d958cc00e8
- Child:
- 6:bb5f989e3425
--- a/main.cpp Sun Aug 18 15:53:10 2013 +0000 +++ b/main.cpp Sun Aug 18 15:58:47 2013 +0000 @@ -92,6 +92,10 @@ int main(void) { iJoyStickUp.rise(&ISR_up); + iJoyStickDown.rise(&ISR_down); + iJoyStickLeft.rise(&ISR_left); + iJoyStickRight.rise(&ISR_right); + iJoyStickCenter.rise(&ISR_center); } /*----------------------------------------------//----------------------------*/ @@ -114,7 +118,7 @@ // calculate slow rate period. dMultiCount = (int) ((float) (1.0 / ((float) UDSAMPLERATE))); - while (dJoyStickUp) // joystick up. + while (dJoyStickLeft) // while joystick still pressed. { // rate-range calculations. dPressedSeconds = (int) (((float) lUpDownHowMany) * UDSAMPLERATE); @@ -149,7 +153,7 @@ // calculate slow rate period. dMultiCount = (int) ((float) (1.0 / ((float) UDSAMPLERATE))); - while (dJoyStickDown) // joystick down. + while (dJoyStickRight) // while joystick still pressed. { // rate-range calculations. dPressedSeconds = (int) (((float) lUpDownHowMany) * UDSAMPLERATE);