// this file defines various constants
typedef enum {
PLX_Start = 0x80,
PLX_Stop = 0x40,
} PLX_Header;
typedef enum {
PLX_AFR = 0, //Wideband Air/Fuel
PLX_EGT = 1, //EGT
PLX_FluidTemp =2, //Fluid Temp
PLX_Vac = 3, //Vac
PLX_Boost = 4, //Boost
PLX_AIT = 5, //AIT
PLX_RPM = 6,
PLX_Speed = 7, //Speed
PLX_TPS = 8, //TPS
PLX_Load = 9 , //Engine Load
PLX_FluidPressure = 10, //Fluid Pressure
PLX_Timing = 11, //Engine timing
PLX_MAP = 12, //MAP
PLX_MAF = 13, //MAF
PLX_ShortFuel = 14, //Short term fuel trim
PLX_LongFuel =15, //Long term fuel trim
PLX_NBO2 = 16, //Narrowband O2 sensor@@@@@@@
PLX_Knock = 19, //Knock
PLX_Fuel = 17, //Fuel level
PLX_Duty = 20, //Duty cycle
PLX_Volts = 18, //Volts
PLX_MAX_OBS
} PLX_Observations;
extern double ConveriMFDRaw2Data(int sensor, int units, int raw);
#pragma pack(push,1)
typedef struct
{
char AddrH;
char AddrL;
char Instance;
char ReadingH;
char ReadingL;
} PLX_SensorInfo;
#pragma pack(pop)
typedef struct
{
char name[5];
int Units; // units to use in display (passed to PLX decoder )
int Low; // low value to use on dial display
int High; // high value to use on dial display
int TickScale; // Scale values by this to give tick spacing
// so a dial with 0.. 1300 and TickScale=100 would display 14 major ticks on the dial face
int DP; // Number of decimal places to display
} PLX_DisplayInfo;
extern PLX_DisplayInfo DisplayInfo[];
static inline int ConvPLX(char H, char L)
{
return ((H & 0x3F)<<6) | (L & 0x3F);
}