54unsignedcharsyncConfirmationsRunning; ///< Upon losing sync while already running, how many sync points are required to consider resync achieved. This should be a relatively high number.
55unsignedcharsyncConfirmationsStarting; ///< Upon losing sync while starting, before having gained sync for the first time, how many sync points are required to consider initial sync achieved. This should be a near-zero for fast starts.
103unsignedshortEGOMinimum; ///< Lambda that 0 Volt input corresponds to.
104unsignedshortEGORange; ///< Lambda difference between what 0V and 5V inputs correspond to.
105unsignedshortBRVMinimum; ///< Battery Voltage that 0 Volt input means. 0 Volts usually. TODO YAGNI usually? always? what/why?
106unsignedshortBRVRange; ///< TODO reword when above is fixed. Real world voltage difference between lowest and highest ADC reading (0 to 5V). FreeEMS standard is 24.5 Volts for 1k and 3k9 resistors on a 12v vehicle.
107unsignedshortTPSMinimumADC; ///< This should be zero, but often isn't, this value is what the TPS input reads with the throttle fully closed.
108unsignedshortTPSMaximumADC; ///< This should be the maximum ADC value, but often isn't. This value is what the TPS input reads with the throttle fully open.
114unsignedshortperCylinderVolume; ///< 500cc = 0.5l 0.5 * 32768 = pcv, so divide by 32768 go get litres.
115unsignedshortinjectorFlow; ///< 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.
116unsignedshortstoichiometricAFR; ///< 34 for hydrogen, all others less, figure is 14.7 * 1024, divide by 1024 to get AFR.
117unsignedshortdensityOfFuelAtSTP; ///< 703gm/litre for Octane. 32 * fuel density = number, divide by 32 for the real figure.
187singleCutIgnitionRPM; ///< Ignition, enabled by default at 5k with both and 220 RPM hysteresis to ensure not lean when power comes back on
188singleCutOverBoost; ///< Ignition, enabled by default, set to rail value for sensor, with large hysteresis, requires time out to operate safely
189
190// Disabled by default until duties are available, then enabled and fuel duty hard coded, elec duty optional, re enabled by time out not just hysteresis
191// singleCut InjectionFuelDuty; ///< Both, disabled by default, until duties are available
192// singleCut InjectionElecDuty; ///< Both, disabled by default, until duties are available
193
194// These require other logic in addition to the generic logic:
195// singleCut TwoStep; ///< Ignition only or both, disabled by default
196// singleCut OverHeat; ///< Ignition only or both, disabled by default
197// singleCut Overrun; ///< Injection, disabled by default
198// singleCut FloodClear; ///< Injection, disabled by default
199cutEnabledcutsEnabled; ///< Override hard code on for desired fuel duty not to exceed 102.4% or similar
255// unsigned char PullUpEnable; ///< Enables per-port weak (~100k) internal pullups. See section 22.3.2.11 on page 834 of MC9S12XDP512RMV2.pdf
256// unsigned char ReducedDrive; ///< Do NOT change this! This reduces drive strength and could harm your engine. See section 22.3.2.12 on page 835 of MC9S12XDP512RMV2.pdf
257unsignedcharPWMEnable; ///< Enables the PWM functionality for each pin. Note for 16 bit you the low order bit enabled. See section 8.3.2.1 on page 368 of MC9S12XDP512RMV2.pdf
258unsignedcharPWMPolarity; ///< Inverts the duty of the output. 1 means "duty is high portion", 0 means "duty is low portion". See section 8.3.2.2 on page 370 of MC9S12XDP512RMV2.pdf
259unsignedcharPWMClock; ///< TODO abstract this away
261unsignedcharPWMCenterAlign; ///< See section 8.3.2.5 on page 372 of MC9S12XDP512RMV2.pdf
262unsignedcharPWMControl; ///< The high four bits concatenate the 8 bit PWM channels into 4 16 bit channels on a pair by pair basis. 4 joins (0,1), 5 joins (2,3), 6 joins (4,5), 7 joins (6,7).
275unsignedcharPWMInitialDuty0; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
276unsignedcharPWMInitialDuty1; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
277unsignedcharPWMInitialDuty2; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
278unsignedcharPWMInitialDuty3; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
279unsignedcharPWMInitialDuty4; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
280unsignedcharPWMInitialDuty5; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
281unsignedcharPWMInitialDuty6; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
282unsignedcharPWMInitialDuty7; ///< The duty cycle at power up. Usually unimportant due to being overwritten by the algorithm involved milliseconds later.
283
284unsignedcharPortInitialValueA; ///< The state of the port at power up. @see PortDirectionA
285unsignedcharPortInitialValueB; ///< The state of the port at power up. @see PortDirectionB
286unsignedcharPortInitialValueC; ///< The state of the port at power up. @see PortDirectionC
287unsignedcharPortInitialValueD; ///< The state of the port at power up. @see PortDirectionD
288unsignedcharPortInitialValueE; ///< The state of the port at power up. @see PortDirectionE
289unsignedcharPortInitialValueH; ///< The state of the port at power up. @see PortDirectionH
290unsignedcharPortInitialValueJ; ///< The state of the port at power up. @see PortDirectionJ
291unsignedcharPortInitialValueK; ///< The state of the port at power up. @see PortDirectionK
292unsignedcharPortInitialValueM; ///< The state of the port at power up. @see PortDirectionM
293unsignedcharPortInitialValueP; ///< The state of the port at power up. @see PortDirectionP
294unsignedcharPortInitialValueS; ///< The state of the port at power up. @see PortDirectionS
295unsignedcharPortInitialValueT; ///< The state of the port at power up. @see PortDirectionT Currently this setting is ignored. TODO Make it take effect on unused port T pins.
296
297unsignedcharPortDirectionA; ///< @see PortDirectionB Pin 6 is the Firmware Load switch input AND the Check Engine Light output. Pin 7 is the standard fuel pump relay drive pin. These bits are therefore overridden and have no effect.
298unsignedcharPortDirectionB; ///< Whether pins act as inputs or outputs, 1 means output, 0 means input. 0 is the default for most pins. Note, peripheral modules which use these pins override this control.
301unsignedcharPortDirectionE; ///< @see PortDirectionB This port is associated with various control bits. Extreme care should be taken when using them, regardless of what for. Pins 0 and 1 are always inputs regardless of this setting.
302unsignedcharPortDirectionH; ///< @see PortDirectionB This port is associated with the SPI1 (0-3), SPI2 (4-7), SCI4 (4,5), and SCI5 (6,7) modules.
303unsignedcharPortDirectionJ; ///< @see PortDirectionB This port is associated with the SCI2 (0,1), I2C0 (6,7), I2C1 (4,5), and CAN4 (6,7) modules.
305unsignedcharPortDirectionM; ///< @see PortDirectionB This port is associated with the CAN0 (0,1), CAN1 (2,3), CAN2 (4,5), CAN3 (6,7), and SCI3 (6,7) modules.
306unsignedcharPortDirectionP; ///< @see PortDirectionB This port is associated with the PWM (0-7) module.
307unsignedcharPortDirectionS; ///< @see PortDirectionB This port is associated with the SCI0 (0,1), SCI1 (2,3), and SPI0 (4-7) modules. Primary communication is over SCI0, therefore the control bits for those pins are overridden to ensure correct operation, and have no effect.
308unsignedcharPortDirectionT; ///< @see PortDirectionB This port is associated with the ECT (0-7) module. Currently this setting is ignored. TODO Make it take effect on unused port T pins.
328unsignedchar userTextField[userTextFieldArrayLength1]; ///< For on-board meta-data such as which vehicle the unit is from, put your personal tuning notes here!
342unsignedchar userTextField2[userTextFieldArrayLength2]; ///< For on-board meta-data such as which vehicle the unit is from, put your personal tuning notes here!