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.
Dependencies: mbed mbed-STM32F103C8T6
Diff: ecu_simulator.h
- Revision:
- 7:467e350d1a10
- Parent:
- 6:41a4ad385daa
--- a/ecu_simulator.h Tue Dec 30 10:10:02 2014 +0000
+++ b/ecu_simulator.h Wed Jun 10 20:15:48 2020 +0000
@@ -1,8 +1,8 @@
#ifndef ECU_SIMULATOR_H
#define ECU_SIMULATOR_H
-#define CANSPEED_125 125000 // CAN speed at 125 kbps
-#define CANSPEED_250 250000 // CAN speed at 250 kbps
+//#define CANSPEED_125 125000 // CAN speed at 125 kbps
+//#define CANSPEED_250 250000 // CAN speed at 250 kbps
#define CANSPEED_500 500000 // CAN speed at 500 kbps
/* Details from http://en.wikipedia.org/wiki/OBD-II_PIDs */
@@ -26,8 +26,10 @@
#define PID_REQUEST 0x7DF
#define PID_REPLY 0x7E8
-typedef struct{
-
+#define ESPAR_CMD 0x7A0 // COMMAND ID
+#define ESPAR_RES 0x73C // response id
+
+typedef struct{
unsigned char coolant_temp;
unsigned int engine_rpm;
unsigned char throttle_position;
@@ -35,7 +37,7 @@
unsigned int maf_airflow;
unsigned int o2_voltage;
unsigned char dtc;
-
+ unsigned char active_fault;
}ecu_t;
extern ecu_t ecu;