Subversion Repositories DashDisplay

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
// this file defines various constants
2
 
3
 
4
typedef enum {
5
        PLX_Start = 0x80,
6
    PLX_Stop  = 0x40,
7
} PLX_Header;
8
 
9
 
10
 
11
typedef enum {
12
  PLX_AFR =   0,      //Wideband Air/Fuel
13
  PLX_EGT =   1,      //EGT
14
  PLX_FluidTemp =2, //Fluid Temp
15
  PLX_Vac =   3,      //Vac
16
  PLX_Boost = 4,   //Boost
17
  PLX_AIT =   5, //AIT
18
  PLX_RPM =   6,
19
  PLX_Speed = 7, //Speed
20
  PLX_TPS =   8, //TPS
21
  PLX_Load =  9 , //Engine Load
22
  PLX_FluidPressure = 10, //Fluid Pressure
23
  PLX_Timing = 11, //Engine timing
24
  PLX_MAP =   12, //MAP
25
  PLX_MAF =   13, //MAF
26
  PLX_ShortFuel = 14, //Short term fuel trim
27
  PLX_LongFuel =15, //Long term fuel trim
28
  PLX_NBO2 =  16, //Narrowband O2 sensor@@@@@@@
29
  PLX_Knock = 19, //Knock
30
  PLX_Fuel =  17, //Fuel level
31
  PLX_Duty  = 20, //Duty cycle
32
  PLX_Volts = 18, //Volts
6 mjames 33
  PLX_MAX_OBS
2 mjames 34
} PLX_Observations;
35
 
36
extern double ConveriMFDRaw2Data(int sensor, int units, int raw);
4 mjames 37
 
38
#pragma pack(push,1)
39
typedef struct
40
{
7 mjames 41
        char AddrH;
42
        char AddrL;
43
        char Instance;
4 mjames 44
        char ReadingH;
45
        char ReadingL;
46
} PLX_SensorInfo;
47
#pragma pack(pop)
48
 
49
typedef struct
50
{
51
        char name[5];
52
        int  Units; // units to use in display (passed to PLX decoder )
53
        int  Low; // low value to use on dial display
54
        int  High; // high value to use on dial display
55
        int  TickScale; // Scale values by this to give tick spacing
56
          // so a dial with 0.. 1300 and TickScale=100 would display 14 major ticks on the dial face
7 mjames 57
         int DP; // Number of decimal places to display
4 mjames 58
} PLX_DisplayInfo;
59
 
60
 
61
extern PLX_DisplayInfo DisplayInfo[];
62
 
63
 
64
static inline int ConvPLX(char H, char L)
65
{
66
        return ((H & 0x3F)<<6) | (L & 0x3F);
67
}
68
 
69