Subversion Repositories DashDisplay

Rev

Rev 4 | Rev 7 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  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_MAX_OBS
  34. } PLX_Observations;
  35.  
  36. extern double ConveriMFDRaw2Data(int sensor, int units, int raw);
  37.  
  38. #pragma pack(push,1)
  39. typedef struct
  40. {
  41.         char ObsH;
  42.         char ObsL;
  43.         char ObsIndex;
  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
  57. } PLX_DisplayInfo;
  58.  
  59.  
  60. extern PLX_DisplayInfo DisplayInfo[];
  61.  
  62.  
  63. static inline int ConvPLX(char H, char L)
  64. {
  65.         return ((H & 0x3F)<<6) | (L & 0x3F);
  66. }
  67.  
  68.  
  69.