Subversion Repositories DashDisplay

Rev

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_Fuel =  17, //Fuel level
  30.   PLX_Volts = 18, //Volts
  31.   PLX_Knock = 19, //Knock
  32.   PLX_Duty  = 20, //Duty cycle
  33.   PLX_X_CHT = 21, // Extended observations for aircooled engine
  34.   PLX_MAX_OBS
  35. } PLX_Observations;
  36.  
  37. extern double ConveriMFDRaw2Data(int sensor, int units, int raw);
  38.  
  39. #pragma pack(push,1)
  40. typedef struct
  41. {
  42.         char AddrH;
  43.         char AddrL;
  44.         char Instance;
  45.         char ReadingH;
  46.         char ReadingL;
  47. } PLX_SensorInfo;
  48. #pragma pack(pop)
  49.  
  50. typedef struct
  51. {
  52.         char name[8];
  53.         int  Units; // units to use in display (passed to PLX decoder )
  54.         int  Low; // low value to use on dial display
  55.         int  High; // high value to use on dial display
  56.         int  TickScale; // Scale values by this to give tick spacing
  57.           // so a dial with 0.. 1300 and TickScale=100 would display 14 major ticks on the dial face
  58.          int DP; // Number of decimal places to display
  59. } PLX_DisplayInfo;
  60.  
  61.  
  62. extern PLX_DisplayInfo DisplayInfo[];
  63.  
  64.  
  65. static inline int ConvPLX(char H, char L)
  66. {
  67.         return ((H & 0x3F)<<6) | (L & 0x3F);
  68. }
  69.  
  70.  
  71.