Subversion Repositories DashDisplay

Rev

Rev 2 | Rev 6 | Go to most recent revision | Details | Compare with Previous | 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
33
} PLX_Observations;
34
 
35
extern double ConveriMFDRaw2Data(int sensor, int units, int raw);
4 mjames 36
 
37
#pragma pack(push,1)
38
typedef struct
39
{
40
        char ObsH;
41
        char ObsL;
42
        char ObsIndex;
43
        char ReadingH;
44
        char ReadingL;
45
} PLX_SensorInfo;
46
#pragma pack(pop)
47
 
48
typedef struct
49
{
50
        char name[5];
51
        int  Units; // units to use in display (passed to PLX decoder )
52
        int  Low; // low value to use on dial display
53
        int  High; // high value to use on dial display
54
        int  TickScale; // Scale values by this to give tick spacing
55
          // so a dial with 0.. 1300 and TickScale=100 would display 14 major ticks on the dial face
56
} PLX_DisplayInfo;
57
 
58
 
59
extern PLX_DisplayInfo DisplayInfo[];
60
 
61
 
62
static inline int ConvPLX(char H, char L)
63
{
64
        return ((H & 0x3F)<<6) | (L & 0x3F);
65
}
66
 
67