Rev 15 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | // this file defines various constants |
2 | |||
20 | mjames | 3 | #if !defined __INC_PLX_H |
4 | #define __INC_PLX_H |
||
2 | mjames | 5 | |
6 | typedef enum { |
||
7 | PLX_Start = 0x80, |
||
8 | PLX_Stop = 0x40, |
||
9 | } PLX_Header; |
||
10 | |||
11 | |||
12 | |||
13 | typedef enum { |
||
14 | PLX_AFR = 0, //Wideband Air/Fuel |
||
15 | PLX_EGT = 1, //EGT |
||
16 | PLX_FluidTemp =2, //Fluid Temp |
||
17 | PLX_Vac = 3, //Vac |
||
18 | PLX_Boost = 4, //Boost |
||
19 | PLX_AIT = 5, //AIT |
||
20 | PLX_RPM = 6, |
||
21 | PLX_Speed = 7, //Speed |
||
22 | PLX_TPS = 8, //TPS |
||
23 | PLX_Load = 9 , //Engine Load |
||
24 | PLX_FluidPressure = 10, //Fluid Pressure |
||
25 | PLX_Timing = 11, //Engine timing |
||
26 | PLX_MAP = 12, //MAP |
||
27 | PLX_MAF = 13, //MAF |
||
28 | PLX_ShortFuel = 14, //Short term fuel trim |
||
29 | PLX_LongFuel =15, //Long term fuel trim |
||
30 | PLX_NBO2 = 16, //Narrowband O2 sensor@@@@@@@ |
||
15 | mjames | 31 | PLX_Fuel = 17, //Fuel level |
32 | PLX_Volts = 18, //Volts |
||
2 | mjames | 33 | PLX_Knock = 19, //Knock |
34 | PLX_Duty = 20, //Duty cycle |
||
15 | mjames | 35 | PLX_X_CHT = 21, // Extended observations for aircooled engine |
6 | mjames | 36 | PLX_MAX_OBS |
2 | mjames | 37 | } PLX_Observations; |
38 | |||
39 | extern double ConveriMFDRaw2Data(int sensor, int units, int raw); |
||
4 | mjames | 40 | |
41 | #pragma pack(push,1) |
||
42 | typedef struct |
||
43 | { |
||
7 | mjames | 44 | char AddrH; |
45 | char AddrL; |
||
46 | char Instance; |
||
4 | mjames | 47 | char ReadingH; |
48 | char ReadingL; |
||
49 | } PLX_SensorInfo; |
||
50 | #pragma pack(pop) |
||
51 | |||
52 | |||
53 | static inline int ConvPLX(char H, char L) |
||
54 | { |
||
55 | return ((H & 0x3F)<<6) | (L & 0x3F); |
||
56 | } |
||
57 | |||
58 | |||
20 | mjames | 59 | #endif |