From 56f0b1f245a738cf51d26fd91f3c4bf0c0aa37e9 Mon Sep 17 00:00:00 2001 From: FredCooke Date: Thu, 1 Jan 2009 14:07:45 +0000 Subject: [PATCH] Removed fixed config struct typedefs from structs.h --- src/inc/structs.h | 101 ------------------------------------------------------ 1 file changed, 101 deletions(-) diff --git a/src/inc/structs.h b/src/inc/structs.h index 08f9646..c26248e 100644 --- a/src/inc/structs.h +++ b/src/inc/structs.h @@ -75,107 +75,6 @@ typedef struct { } blockDetails; -/* Fixed Configuration - place things that do not * - * change after initial setup or during tuning here. */ -#define FIXED_CONFIG1_SIZE sizeof(fixedConfig1) -typedef struct { - - /* Settings variables : 0 = false */ - unsigned short coreSettingsA; /* Each bit represents the state of some core setting, masks below and above where the same one is used */ - /* Bit masks for coreSettingsA */ // TODO needs a rename, as does coreStatusA - //#define COREA1 BIT1_16 /* 1 */ - #define PRIMARY_POLARITY BIT2_16 /* 2 1 = high teeth 0 = low teeth */ - #define SECONDARY_POLARITY BIT3_16 /* 3 1 = high teeth 0 = low teeth */ - //#define COREA4 BIT4_16 /* 4 */ - //#define FUEL_CUT BIT5_16 /* 5 Remove injection completely */ - //#define HARD_SPARK_CUT BIT6_16 /* 6 Remove ignition completely */ - //#define SOFT_SPARK_CUT BIT7_16 /* 7 Remove ignition events round robin style */ - //#define SPARK_RETARD BIT8_16 /* 8 Retard ignition in RPM dependent way */ - #define STAGED_ON BIT9_16 /* 9 Whether we are firing the staged injectors */ - #define STAGED_START BIT10_16 /* 10 1 = Fixed start 0 = Scheduled start */ - #define STAGED_END BIT11_16 /* 11 1 = Fixed end 0 = Scheduled end */ - //#define COREA12 BIT12_16 /* 12 */ - //#define COREA13 BIT13_16 /* 13 */ - //#define COREA14 BIT14_16 /* 14 */ - //#define COREA15 BIT15_16 /* 15 */ - //#define COREA16 BIT16_16 /* 16 */ - - - /* Pre configured value settings for the sensor inputs */ - unsigned short presetIAT; - unsigned short presetCHT; - unsigned short presetTPS; - unsigned short presetEGO; - unsigned short presetBRV; - unsigned short presetMAP; - unsigned short presetAAP; - unsigned short presetMAT; - unsigned short presetEGO2; - unsigned short presetIAP; - unsigned short presetBPW; /* Base Pulse Width */ - unsigned short presetAF; /* Air Flow */ - - - /* Fuel injection settings TODO duplication from original temp code below!! */ - unsigned short perCylinderVolume; /* 500cc = 0.5l 0.5 * 32768 = pcv, so divide by 32768 go get litres */ - unsigned short stoichiometricAFR; /* 34 for hydrogen, all others less, figure is 14.7 * 1024, divide by 1024 to get AFR */ - unsigned short injectorFlow; /* Injector flow of 240cc/min / 60 is 4ml/second is multiplied by 1024, so divide by 1024 for ml/second, divide by 1000 for litres/second */ - unsigned short densityOfFuelAtSTP; /* 703gm/litre for Octane. 32 * fuel density = number, divide by 32 for the real figure */ - - /* Sensor related settings */ - unsigned short TPSClosedMAP; - unsigned short TPSOpenMAP; - - - /* Sensor input conditioning settings */ - /* These are used to calculate MAP, EGO and TPS from ADC readings. */ - unsigned short MAPMinimum; /* 0 kPa usually. */ - unsigned short MAPRange; /* 10000, 11500, 25000, 30000, 40000 etc (/100 for kPa) */ - unsigned short AAPMinimum; /* 0 kPa usually. */ - unsigned short AAPRange; /* 10000, 11500, 25000, 30000, 40000 etc (/100 for kPa) */ - unsigned short EGOMinimum; /* 0.5 lambda ? (0.5 x 32768 = 16384) */ - unsigned short EGORange; /* 1.5 lambda ? ((1.5 - 0.5) x 32768 = 32768 (max 49152)) */ - unsigned short BRVMinimum; /* 0 Volts usually. */ - unsigned short BRVRange; /* 24.5 Volts for 10k and 39k resistors on a 12v vehicle */ - unsigned short TPSMinimumADC; /* *should* be zero, but often isn't, this value corresponds to 0% TPS */ - unsigned short TPSMaximumADC; /* */ - // unsigned short TPSADCRange; // ?? 100% = how many ADCs ? - /*efine TPS_MINIMUM 0 ** = 0.00% For clarity ONLY, always zero. */ - #define TPS_RANGE_MAX 64000 /* = 100.00% */ - unsigned char userTextField[userTextFieldArrayLength1]; /* "Place your personal notes here!!" */ -} fixedConfig1; - - -/* Fixed Configuration - place things that do not * - * change after initial setup or during tuning here. */ -#define FIXED_CONFIG2_SIZE sizeof(fixedConfig2) -typedef struct { - - /* Setting variables (must be inited with useful values) */ - unsigned short capacityOfAirPerCombustionEvent; /* How much air it swallows per power producing event */ - unsigned short perPrimaryInjectorChannelFlowRate; /* How much fuel flows per minute per channel */ - unsigned short perSecondaryInjectorChannelFlowRate; /* How much fuel flows per minute per channel */ - unsigned short readingTimeout; /* How often an ADC reading MUST occur */ - unsigned char ports; /* How many groups of injectors we are firing */ - unsigned char coils; /* How many coils we are firing */ - unsigned char combustionEventsPerEngineCycle; /* How many power producing events per engine cycle */ - unsigned char revolutionsPerEngineCycle; /* Rotary = 1, 2 Stroke = 1, 4 Stroke = 2 */ - unsigned char primaryTeeth; /* How many teeth are on the crank signal including the missing ones if any (eg. 36-1 primary = 36 not 35) */ - unsigned char missingTeeth; /* Number sequentially removed from primary teeth (eg. 36-1 missing = 1) */ - - /* Serial settings */ - unsigned short baudDivisor; /* 22 = (40MHz / (16*115.2kHz)) = 21.7013889 */ - unsigned char networkAddress; /* Default = 1, Default for PC = 10 */ - - /* Tacho settings */ - unsigned char tachoTickFactor; - unsigned short tachoTotalFactor; - - /* User text field for noting which installation the unit is from etc. */ - unsigned char userTextField[userTextFieldArrayLength2]; /* "Place your personal notes here!!" */ -} fixedConfig2; - - #define DERIVED_VARS_SIZE sizeof(DerivedVar) #define DERIVED_VARS_WIDTH IN_OUT_BANKS /* How many elements per array currently 2 at 25/6/08 */ #define DERIVED_VARS_UNIT 2 /* How large each element is in bytes (short = 2 bytes) */ -- 2.11.4.GIT