Railway Challenge
/
challenge-RegenBrakingUpdate
Updated Regen Braking Logic.
Revision 29:2ed4d9c309fc, committed 2022-06-15
- Comitter:
- cdevarakonda
- Date:
- Wed Jun 15 13:38:05 2022 +0000
- Parent:
- 28:1086791972d0
- Commit message:
- added brake control redundancy
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1086791972d0 -r 2ed4d9c309fc main.cpp --- a/main.cpp Wed Jun 15 13:36:11 2022 +0000 +++ b/main.cpp Wed Jun 15 13:38:05 2022 +0000 @@ -64,6 +64,7 @@ motor1.throttle(0.0f); brakeValve32 = 0; brakeValve22 = 0; + //inParkMode=true; //brakes1.BrakesOn(); } else {//REGEN BRAKING @@ -345,7 +346,8 @@ motor1.throttle(0); } ////Park Mode - if (driveMode == 2) { //place in park mode if selected by driver + if (driveMode == 2) { + brakeControl(4); //place in park mode if selected by driver if (inParkMode == false) { pc.printf("Train in park mode.\r\n"); //why? }