mirror of https://github.com/rusefi/rusefi.git
Unified cyl count macro (#2914)
* update test framework * eh * hey look it's fewer warnings * unwind * fix * config * configs * logic * even java had some * console needs help
This commit is contained in:
parent
aabdea4140
commit
2eb0b2a631
|
@ -119,9 +119,9 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
// todo:
|
||||
int i;
|
||||
for (i = 0; i < INJECTION_PIN_COUNT; i++)
|
||||
for (i = 0; i < MAX_CYLINDER_COUNT; i++)
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
for (i = 0; i < IGNITION_PIN_COUNT; i++)
|
||||
for (i = 0; i < MAX_CYLINDER_COUNT; i++)
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
|
||||
engineConfiguration->adcVcc = 5.0f;
|
||||
|
|
|
@ -33,7 +33,7 @@ static void setInjectorPins() {
|
|||
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 6; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 6; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ static void setIgnitionPins() {
|
|||
engineConfiguration->ignitionPins[5] = GPIOB_8;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 6; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 6; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ static void setInjectorPins() {
|
|||
//engineConfiguration->injectionPins[7] = GPIOF_14;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ static void setIgnitionPins() {
|
|||
//engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ static void setInjectorPins() {
|
|||
engineConfiguration->injectionPins[7] = GPIOF_14;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 8; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 8; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ static void setIgnitionPins() {
|
|||
engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 8; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 8; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ static void setInjectorPins() {
|
|||
//engineConfiguration->injectionPins[7] = GPIOF_14;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ static void setIgnitionPins() {
|
|||
//engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ static void setInjectorPins() {
|
|||
//engineConfiguration->injectionPins[7] = GPIOF_14;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ static void setIgnitionPins() {
|
|||
//engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,9 +84,9 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
// todo:
|
||||
int i;
|
||||
for (i = 0; i < INJECTION_PIN_COUNT; i++)
|
||||
for (i = 0; i < MAX_CYLINDER_COUNT; i++)
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
for (i = 0; i < IGNITION_PIN_COUNT; i++)
|
||||
for (i = 0; i < MAX_CYLINDER_COUNT; i++)
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
|
||||
engineConfiguration->adcVcc = 5.0f;
|
||||
|
|
|
@ -34,7 +34,7 @@ static void setInjectorPins() {
|
|||
engineConfiguration->injectionPins[3] = TLE8888_PIN_4;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ static void setIgnitionPins() {
|
|||
engineConfiguration->ignitionPins[3] = GPIOD_1;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->injectionPins[2] = GPIOE_12;
|
||||
engineConfiguration->injectionPins[3] = GPIOE_11;
|
||||
// Disable the remainder only when they may never be assigned
|
||||
for (int i = 4; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->ignitionPins[2] = GPIOD_2;
|
||||
engineConfiguration->ignitionPins[3] = GPIOD_1;
|
||||
// Disable remainder
|
||||
for (int i = 4; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
|
|
@ -574,10 +574,8 @@ void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
#endif // HW_PROTEUS
|
||||
|
||||
void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
|
|
|
@ -226,7 +226,7 @@ void printOverallStatus(efitimesec_t nowSeconds) {
|
|||
printOutPin(PROTOCOL_WA_CHANNEL_2, CONFIG(logicAnalyzerPins)[1]);
|
||||
#endif /* EFI_LOGIC_ANALYZER */
|
||||
|
||||
int cylCount = minI(minI(CONFIG(specs.cylindersCount), INJECTION_PIN_COUNT), IGNITION_PIN_COUNT);
|
||||
int cylCount = minI(CONFIG(specs.cylindersCount), MAX_CYLINDER_COUNT);
|
||||
for (int i = 0; i < cylCount; i++) {
|
||||
printOutPin(enginePins.coils[i].getShortName(), CONFIG(ignitionPins)[i]);
|
||||
|
||||
|
|
|
@ -312,13 +312,13 @@ public:
|
|||
* pre-calculated offset for given sequence index within engine cycle
|
||||
* (not cylinder ID)
|
||||
*/
|
||||
angle_t ignitionPositionWithinEngineCycle[IGNITION_PIN_COUNT];
|
||||
angle_t ignitionPositionWithinEngineCycle[MAX_CYLINDER_COUNT];
|
||||
/**
|
||||
* pre-calculated reference to which output pin should be used for
|
||||
* given sequence index within engine cycle
|
||||
* todo: update documentation
|
||||
*/
|
||||
int ignitionPin[IGNITION_PIN_COUNT];
|
||||
int ignitionPin[MAX_CYLINDER_COUNT];
|
||||
|
||||
/**
|
||||
* this is invoked each time we register a trigger tooth signal
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
/**
|
||||
* MAP averaging angle start, in relation to 'mapAveragingSchedulingAtIndex' trigger index index
|
||||
*/
|
||||
angle_t mapAveragingStart[INJECTION_PIN_COUNT];
|
||||
angle_t mapAveragingStart[MAX_CYLINDER_COUNT];
|
||||
angle_t mapAveragingDuration = 0;
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "trigger_structure.h"
|
||||
#include "accel_enrichment.h"
|
||||
|
||||
#define MAX_INJECTION_OUTPUT_COUNT INJECTION_PIN_COUNT
|
||||
#define MAX_WIRES_COUNT 2
|
||||
|
||||
class Engine;
|
||||
|
@ -76,7 +75,7 @@ public:
|
|||
/**
|
||||
* injection events, per cylinder
|
||||
*/
|
||||
InjectionEvent elements[MAX_INJECTION_OUTPUT_COUNT];
|
||||
InjectionEvent elements[MAX_CYLINDER_COUNT];
|
||||
bool isReady = false;
|
||||
};
|
||||
|
||||
|
@ -129,14 +128,12 @@ public:
|
|||
IgnitionOutputPin *getOutputForLoggins();
|
||||
};
|
||||
|
||||
#define MAX_IGNITION_EVENT_COUNT IGNITION_PIN_COUNT
|
||||
|
||||
class IgnitionEventList {
|
||||
public:
|
||||
/**
|
||||
* ignition events, per cylinder
|
||||
*/
|
||||
IgnitionEvent elements[MAX_IGNITION_EVENT_COUNT];
|
||||
IgnitionEvent elements[MAX_CYLINDER_COUNT];
|
||||
bool isReady = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ typedef enum {
|
|||
|
||||
|
||||
// 16 cylinder
|
||||
// unfortunately not supported by default firmware because INJECTION_PIN_COUNT=IGNITION_PIN_COUNT=12 by default
|
||||
// unfortunately not supported by default firmware because MAX_CYLINDER_COUNT=12 by default
|
||||
FO_1_14_9_4_7_12_15_6_13_8_3_16_11_2_5_10 = 22, // WR16
|
||||
|
||||
// max used = 26
|
||||
|
|
|
@ -14,7 +14,7 @@ EXTERN_ENGINE;
|
|||
#if EFI_ENGINE_CONTROL
|
||||
|
||||
FuelSchedule::FuelSchedule() {
|
||||
for (int cylinderIndex = 0; cylinderIndex < MAX_INJECTION_OUTPUT_COUNT; cylinderIndex++) {
|
||||
for (int cylinderIndex = 0; cylinderIndex < MAX_CYLINDER_COUNT; cylinderIndex++) {
|
||||
InjectionEvent *ev = &elements[cylinderIndex];
|
||||
ev->ownIndex = cylinderIndex;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ static volatile int mapMeasurementsCounter = 0;
|
|||
static float v_averagedMapValue;
|
||||
|
||||
// allow a bit more smoothing
|
||||
#define MAX_MAP_BUFFER_LENGTH (INJECTION_PIN_COUNT * 2)
|
||||
#define MAX_MAP_BUFFER_LENGTH (MAX_CYLINDER_COUNT * 2)
|
||||
// in MAP units, not voltage!
|
||||
static float averagedMapRunningBuffer[MAX_MAP_BUFFER_LENGTH];
|
||||
int mapMinBufferLength = 0;
|
||||
|
@ -97,8 +97,8 @@ EXTERN_ENGINE;
|
|||
/**
|
||||
* here we have averaging start and averaging end points for each cylinder
|
||||
*/
|
||||
static scheduling_s startTimers[INJECTION_PIN_COUNT][2];
|
||||
static scheduling_s endTimers[INJECTION_PIN_COUNT][2];
|
||||
static scheduling_s startTimers[MAX_CYLINDER_COUNT][2];
|
||||
static scheduling_s endTimers[MAX_CYLINDER_COUNT][2];
|
||||
|
||||
/**
|
||||
* that's a performance optimization: let's not bother averaging
|
||||
|
|
|
@ -300,7 +300,7 @@ int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
|
||||
const int firingOrderLength = getFiringOrderLength(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
if (firingOrderLength < 1 || firingOrderLength > INJECTION_PIN_COUNT) {
|
||||
if (firingOrderLength < 1 || firingOrderLength > MAX_CYLINDER_COUNT) {
|
||||
firmwareError(CUSTOM_ERR_6687, "fol %d", firingOrderLength);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ static void setPotSpi(int spi) {
|
|||
*/
|
||||
static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
||||
int index = atoi(indexStr) - 1; // convert from human index into software index
|
||||
if (index < 0 || index >= IGNITION_PIN_COUNT)
|
||||
if (index < 0 || index >= MAX_CYLINDER_COUNT)
|
||||
return;
|
||||
brain_pin_e pin = parseBrainPin(pinName);
|
||||
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
||||
|
@ -573,7 +573,7 @@ static void setFuelPumpPin(const char *pinName) {
|
|||
|
||||
static void setInjectionPin(const char *indexStr, const char *pinName) {
|
||||
int index = atoi(indexStr) - 1; // convert from human index into software index
|
||||
if (index < 0 || index >= INJECTION_PIN_COUNT)
|
||||
if (index < 0 || index >= MAX_CYLINDER_COUNT)
|
||||
return;
|
||||
brain_pin_e pin = parseBrainPin(pinName);
|
||||
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
||||
|
|
|
@ -127,14 +127,12 @@ EnginePins::EnginePins() :
|
|||
tachOut.name = PROTOCOL_TACH_NAME;
|
||||
hpfpValve.name = PROTOCOL_HPFP_NAME;
|
||||
|
||||
static_assert(efi::size(sparkNames) >= IGNITION_PIN_COUNT, "Too many ignition pins");
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
|
||||
static_assert(efi::size(sparkNames) >= MAX_CYLINDER_COUNT, "Too many ignition pins");
|
||||
static_assert(efi::size(injectorNames) >= MAX_CYLINDER_COUNT, "Too many injection pins");
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT;i++) {
|
||||
enginePins.coils[i].name = sparkNames[i];
|
||||
enginePins.coils[i].shortName = sparkShortNames[i];
|
||||
}
|
||||
|
||||
static_assert(efi::size(injectorNames) >= INJECTION_PIN_COUNT, "Too many injection pins");
|
||||
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
||||
enginePins.injectors[i].injectorIndex = i;
|
||||
enginePins.injectors[i].name = injectorNames[i];
|
||||
enginePins.injectors[i].shortName = injectorShortNames[i];
|
||||
|
@ -167,10 +165,8 @@ EnginePins::EnginePins() :
|
|||
|
||||
bool EnginePins::stopPins() {
|
||||
bool result = false;
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT; i++) {
|
||||
result |= coils[i].stop();
|
||||
}
|
||||
for (int i = 0; i < INJECTION_PIN_COUNT; i++) {
|
||||
result |= injectors[i].stop();
|
||||
}
|
||||
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
||||
|
@ -229,17 +225,15 @@ void EnginePins::startPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
void EnginePins::reset() {
|
||||
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT;i++) {
|
||||
injectors[i].reset();
|
||||
}
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
|
||||
coils[i].reset();
|
||||
}
|
||||
}
|
||||
|
||||
void EnginePins::stopIgnitionPins(void) {
|
||||
#if EFI_PROD_CODE
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT; i++) {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT; i++) {
|
||||
unregisterOutputIfPinOrModeChanged(enginePins.coils[i], ignitionPins[i], ignitionPinMode);
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
@ -247,7 +241,7 @@ void EnginePins::stopIgnitionPins(void) {
|
|||
|
||||
void EnginePins::stopInjectionPins(void) {
|
||||
#if EFI_PROD_CODE
|
||||
for (int i = 0; i < INJECTION_PIN_COUNT; i++) {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT; i++) {
|
||||
unregisterOutputIfPinOrModeChanged(enginePins.injectors[i], injectionPins[i], injectionPinMode);
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
@ -617,10 +611,8 @@ void initPrimaryPins() {
|
|||
* The whole method is pretty naive, but that's at least something.
|
||||
*/
|
||||
void turnAllPinsOff(void) {
|
||||
for (int i = 0; i < INJECTION_PIN_COUNT; i++) {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT; i++) {
|
||||
enginePins.injectors[i].setValue(false);
|
||||
}
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT; i++) {
|
||||
enginePins.coils[i].setValue(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,8 +207,8 @@ public:
|
|||
OutputPin sdCsPin;
|
||||
OutputPin accelerometerCs;
|
||||
|
||||
InjectorOutputPin injectors[INJECTION_PIN_COUNT];
|
||||
IgnitionOutputPin coils[IGNITION_PIN_COUNT];
|
||||
InjectorOutputPin injectors[MAX_CYLINDER_COUNT];
|
||||
IgnitionOutputPin coils[MAX_CYLINDER_COUNT];
|
||||
NamedOutputPin auxValve[AUX_DIGITAL_VALVE_COUNT];
|
||||
OutputPin tcuSolenoids[TCU_SOLENOID_COUNT];
|
||||
|
||||
|
|
|
@ -145,8 +145,7 @@ struct_no_prefix engine_configuration_s
|
|||
#define IGN_LOAD_COUNT 16
|
||||
#define IGN_RPM_COUNT 16
|
||||
|
||||
#define INJECTION_PIN_COUNT 12
|
||||
#define IGNITION_PIN_COUNT 12
|
||||
#define MAX_CYLINDER_COUNT 12
|
||||
#define EGT_CHANNEL_COUNT 8
|
||||
#define DIGIPOT_COUNT 4
|
||||
#define HW_MAX_ADC_INDEX 17
|
||||
|
@ -752,8 +751,8 @@ float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2
|
|||
! todo: rename to triggerSimulatorRpm
|
||||
int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X\nTODO: rename to triggerSimulatorRpm;"Rpm", 1, 0, 0, 30000, 0
|
||||
|
||||
output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins;
|
||||
output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins;
|
||||
output_pin_e[MAX_CYLINDER_COUNT iterate] injectionPins;
|
||||
output_pin_e[MAX_CYLINDER_COUNT iterate] ignitionPins;
|
||||
|
||||
pin_output_mode_e injectionPinMode;
|
||||
pin_output_mode_e ignitionPinMode;
|
||||
|
@ -1366,7 +1365,7 @@ tle8888_mode_e tle8888mode;
|
|||
pid_s etbWastegatePid;
|
||||
uint8_t[4] unused2536;;"units", 1, 0, -20, 100, 0
|
||||
|
||||
angle_t[IGNITION_PIN_COUNT iterate] timing_offset_cylinder;per-cylinder timing correction;"deg", 1, 0, -720, 720, 1
|
||||
angle_t[MAX_CYLINDER_COUNT iterate] timing_offset_cylinder;per-cylinder timing correction;"deg", 1, 0, -720, 720, 1
|
||||
|
||||
|
||||
float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1
|
||||
|
@ -1489,7 +1488,7 @@ tChargeMode_e tChargeMode;
|
|||
|
||||
float etbIdleThrottleRange;+This sets the range of the idle control on the ETB. At 100% idle position, the value specified here sets the base ETB position.;"%", 1, 0, 0, 15, 0
|
||||
|
||||
uint8_t[INJECTION_PIN_COUNT iterate] cylinderBankSelect;+Select which fuel correction bank this cylinder belongs to. Group cylinders that share the same O2 sensor;"", 1, 1, 1, 2, 0
|
||||
uint8_t[MAX_CYLINDER_COUNT iterate] cylinderBankSelect;+Select which fuel correction bank this cylinder belongs to. Group cylinders that share the same O2 sensor;"", 1, 1, 1, 2, 0
|
||||
|
||||
int[2] unused4028;;"units", 1, 0, -20, 100, 0
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ static void scheduleReboot(void) {
|
|||
|
||||
// Returns false if there's an obvious problem with the loaded configuration
|
||||
static bool validateConfig() {
|
||||
if (CONFIG(specs.cylindersCount) > minI(INJECTION_PIN_COUNT, IGNITION_PIN_COUNT)) {
|
||||
if (CONFIG(specs.cylindersCount) > MAX_CYLINDER_COUNT) {
|
||||
firmwareError(OBD_PCM_Processor_Fault, "Invalid cylinder count: %d", CONFIG(specs.cylindersCount));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Jul 05 23:54:58 UTC 2021
|
||||
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Tue Jul 06 16:59:56 PDT 2021
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -900,7 +900,6 @@ public class Fields {
|
|||
public static final int idleVeBins_offset = 6608;
|
||||
public static final int IGN_LOAD_COUNT = 16;
|
||||
public static final int IGN_RPM_COUNT = 16;
|
||||
public static final int IGNITION_PIN_COUNT = 12;
|
||||
public static final int ignitionDwellForCrankingMs_offset = 100;
|
||||
public static final int ignitionIatCorrLoadBins_offset = 13856;
|
||||
public static final int ignitionIatCorrRpmBins_offset = 13920;
|
||||
|
@ -929,7 +928,6 @@ public class Fields {
|
|||
public static final String INDICATOR_NAME_BRAKE_DOWN = "brake: down";
|
||||
public static final String INDICATOR_NAME_CLUTCH_DOWN = "clutch: down";
|
||||
public static final String INDICATOR_NAME_CLUTCH_UP = "clutch: up";
|
||||
public static final int INJECTION_PIN_COUNT = 12;
|
||||
public static final int injectionMode_offset = 428;
|
||||
public static final int injectionPhase_offset = 13984;
|
||||
public static final int injectionPinMode_offset = 648;
|
||||
|
@ -1119,6 +1117,7 @@ public class Fields {
|
|||
public static final int max31855_cs7_offset = 802;
|
||||
public static final int max31855_cs8_offset = 803;
|
||||
public static final int max31855spiDevice_offset = 675;
|
||||
public static final int MAX_CYLINDER_COUNT = 12;
|
||||
public static final int maxAcClt_offset = 1711;
|
||||
public static final int maxAcRpm_offset = 1708;
|
||||
public static final int maxAcTps_offset = 1710;
|
||||
|
@ -1251,7 +1250,7 @@ public class Fields {
|
|||
public static final int servoOutputPins8_offset = 3147;
|
||||
public static final int showHumanReadableWarning_offset = 976;
|
||||
public static final int showSdCardWarning_offset = 76;
|
||||
public static final int SIGNATURE_HASH = 1254010164;
|
||||
public static final int SIGNATURE_HASH = 1177193027;
|
||||
public static final int silentTriggerError_offset = 1464;
|
||||
public static final int slowAdcAlpha_offset = 2088;
|
||||
public static final int sparkDwellRpmBins_offset = 332;
|
||||
|
@ -1553,7 +1552,7 @@ public class Fields {
|
|||
public static final char TS_SD_R_COMMAND = 'r';
|
||||
public static final char TS_SD_W_COMMAND = 'w';
|
||||
public static final char TS_SET_LOGGER_SWITCH = 'l';
|
||||
public static final String TS_SIGNATURE = "rusEFI 2021.07.06.all.1254010164";
|
||||
public static final String TS_SIGNATURE = "rusEFI 2021.07.07.all.1177193027";
|
||||
public static final char TS_SINGLE_WRITE_COMMAND = 'W';
|
||||
public static final char TS_TEST_COMMAND = 't';
|
||||
public static final int TT_TT_1_16 = 50;
|
||||
|
|
|
@ -106,7 +106,7 @@ public class BenchTestPane {
|
|||
}
|
||||
|
||||
private Component createSparkTest() {
|
||||
final JComboBox<Integer> indexes = createIndexCombo(Fields.IGNITION_PIN_COUNT);
|
||||
final JComboBox<Integer> indexes = createIndexCombo(Fields.MAX_CYLINDER_COUNT);
|
||||
CommandControl panel = new CommandControl(uiContext,"Spark #", "spark.jpg", TEST, indexes) {
|
||||
@Override
|
||||
protected String getCommand() {
|
||||
|
@ -117,7 +117,7 @@ public class BenchTestPane {
|
|||
}
|
||||
|
||||
private Component createInjectorTest() {
|
||||
final JComboBox<Integer> indexes = createIndexCombo(Fields.INJECTION_PIN_COUNT);
|
||||
final JComboBox<Integer> indexes = createIndexCombo(Fields.MAX_CYLINDER_COUNT);
|
||||
CommandControl panel = new CommandControl(uiContext,"Injector #", "injector.png", TEST, indexes) {
|
||||
@Override
|
||||
protected String getCommand() {
|
||||
|
|
Loading…
Reference in New Issue