Library to control Dodge LX (83.3k) CAN devices
Dependents: DodgeRadioEmulatorv30
Revision 2:ade5ba8a9d37, committed 2013-01-25
- Comitter:
- rtgree01
- Date:
- Fri Jan 25 04:04:27 2013 +0000
- Parent:
- 1:6dcab41a32df
- Commit message:
- Library to control Dodge LX (83.3k) CAN devices
Changed in this revision
radioEmulator.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6dcab41a32df -r ade5ba8a9d37 radioEmulator.cpp --- a/radioEmulator.cpp Tue Jan 01 03:52:54 2013 +0000 +++ b/radioEmulator.cpp Fri Jan 25 04:04:27 2013 +0000 @@ -6,6 +6,8 @@ DigitalOut led3(LED3); DigitalOut led4(LED4); +DigitalOut reverse(p15); + #undef CHECK_HW_SHUTDOWN @@ -28,6 +30,8 @@ can_RS = rs; canIRQ = irq; + reverse = 0; + prevSWC = 0; memset(&status, 0, sizeof(status)); @@ -483,6 +487,14 @@ { status._brake = can_MsgRx.data[3] & 0x01; status._gear = can_MsgRx.data[4]; + if (status._gear == 'R') + { + reverse = 1; + } + else + { + reverse = 0; + } } else if (can_MsgRx.id == 0x012) {