Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Dealer_18feb17 by
OBD.h@11:77e595130230, 2017-01-27 (annotated)
- Committer:
- NarendraSingh
- Date:
- Fri Jan 27 18:30:02 2017 +0000
- Revision:
- 11:77e595130230
Before implementing queue;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
NarendraSingh | 11:77e595130230 | 1 | #include "mbed.h" |
NarendraSingh | 11:77e595130230 | 2 | #include "rtos.h" |
NarendraSingh | 11:77e595130230 | 3 | #include "Common_Defs.h" |
NarendraSingh | 11:77e595130230 | 4 | |
NarendraSingh | 11:77e595130230 | 5 | #define RESET_OBD_DEVICE "ATZ\r" |
NarendraSingh | 11:77e595130230 | 6 | #define READ_BATTERY_VOLTAGE "ATRV\r" |
NarendraSingh | 11:77e595130230 | 7 | #define READ_ENGINE_RPM "010c\r" |
NarendraSingh | 11:77e595130230 | 8 | #define READ_VEHICLE_SPEED "010D\r" |
NarendraSingh | 11:77e595130230 | 9 | |
NarendraSingh | 11:77e595130230 | 10 | //This is a character buffer that will store the data from the serial port |
NarendraSingh | 11:77e595130230 | 11 | extern char OBD_RxData[30]; |
NarendraSingh | 11:77e595130230 | 12 | extern char OBD_RxIndex; |
NarendraSingh | 11:77e595130230 | 13 | //Variables to hold the speed and RPM data. |
NarendraSingh | 11:77e595130230 | 14 | extern int vehicleSpeed; |
NarendraSingh | 11:77e595130230 | 15 | extern int vehicleRPM; |
NarendraSingh | 11:77e595130230 | 16 | extern char Battery_Voltage[6]; |
NarendraSingh | 11:77e595130230 | 17 | void Initialize_OBD(void); |
NarendraSingh | 11:77e595130230 | 18 | void Get_OBD_Response(void); |
NarendraSingh | 11:77e595130230 | 19 | uint16 Calculate_Wheels_RPM(uint8* Buffer); |
NarendraSingh | 11:77e595130230 | 20 | void flushSerialBuffer(void); |
NarendraSingh | 11:77e595130230 | 21 | void Get_Vehicle_RPM(void); |
NarendraSingh | 11:77e595130230 | 22 | void Get_Vehicle_Speed(void); |
NarendraSingh | 11:77e595130230 | 23 | void Get_Battery_Voltage(void); |
NarendraSingh | 11:77e595130230 | 24 | void OBD_Rcvd_Cmd_Processing_thread(void const *args); |