auto-sync
This commit is contained in:
parent
168b11796f
commit
9e65134415
|
@ -72,7 +72,6 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_F) {
|
|||
// set_global_trigger_offset_angle 540
|
||||
engineConfiguration->globalTriggerAngleOffset = 540;
|
||||
|
||||
engineConfiguration->isFuelPumpEnabled = true;
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
|
|
|
@ -678,8 +678,6 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->secondTriggerChannelEnabled = true;
|
||||
|
||||
engineConfiguration->isMapAveragingEnabled = true;
|
||||
engineConfiguration->isMilEnabled = true;
|
||||
engineConfiguration->isFuelPumpEnabled = true;
|
||||
engineConfiguration->isTunerStudioEnabled = true;
|
||||
engineConfiguration->isWaveAnalyzerEnabled = true;
|
||||
engineConfiguration->isIdleThreadEnabled = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 12:09:43 EST 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 23:08:47 EST 2016
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -1259,6 +1259,7 @@ typedef struct {
|
|||
bool isIgnitionEnabled : 1;
|
||||
/**
|
||||
* If TPS above 95% no fuel would be injected during cranking
|
||||
* enable cylinder_cleanup
|
||||
offset 1500 bit 2 */
|
||||
bool isCylinderCleanupEnabled : 1;
|
||||
/**
|
||||
|
@ -1271,12 +1272,11 @@ typedef struct {
|
|||
offset 1500 bit 5 */
|
||||
bool isMapAveragingEnabled : 1;
|
||||
/**
|
||||
* enable mil
|
||||
offset 1500 bit 6 */
|
||||
bool isMilEnabled : 1;
|
||||
bool anotherUnusedBit1 : 1;
|
||||
/**
|
||||
offset 1500 bit 7 */
|
||||
bool isFuelPumpEnabled : 1;
|
||||
bool anotherUnusedBit2 : 1;
|
||||
/**
|
||||
offset 1500 bit 8 */
|
||||
bool isTunerStudioEnabled : 1;
|
||||
|
@ -2006,4 +2006,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 12:09:43 EST 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 23:08:47 EST 2016
|
||||
|
|
|
@ -132,6 +132,22 @@ static void setFsioInputPin(const char *indexStr, const char *pinName) {
|
|||
scheduleMsg(logger, "FSIO input pin #%d [%s]", (index + 1), hwPortname(pin));
|
||||
}
|
||||
|
||||
static void setFsioPidOutputPin(const char *indexStr, const char *pinName) {
|
||||
int index = atoi(indexStr) - 1;
|
||||
if (index < 0 || index >= AUX_PID_COUNT) {
|
||||
scheduleMsg(logger, "invalid AUX index: %d", index);
|
||||
return;
|
||||
}
|
||||
brain_pin_e pin = parseBrainPin(pinName);
|
||||
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
||||
if (pin == GPIO_INVALID) {
|
||||
scheduleMsg(logger, "invalid pin name [%s]", pinName);
|
||||
return;
|
||||
}
|
||||
engineConfiguration->auxPidPins[index] = pin;
|
||||
scheduleMsg(logger, "FSIO aux pin #%d [%s]", (index + 1), hwPortname(pin));
|
||||
}
|
||||
|
||||
static void setFsioOutputPin(const char *indexStr, const char *pinName) {
|
||||
int index = atoi(indexStr) - 1;
|
||||
if (index < 0 || index >= LE_COMMAND_COUNT) {
|
||||
|
@ -318,7 +334,7 @@ void runFsio(void) {
|
|||
}
|
||||
|
||||
#if EFI_FUEL_PUMP || defined(__DOXYGEN__)
|
||||
if (boardConfiguration->fuelPumpPin != GPIO_UNASSIGNED && engineConfiguration->isFuelPumpEnabled) {
|
||||
if (boardConfiguration->fuelPumpPin != GPIO_UNASSIGNED) {
|
||||
setPinState("pump", &enginePins.fuelPumpRelay, fuelPumpLogic, engine);
|
||||
}
|
||||
#endif /* EFI_FUEL_PUMP */
|
||||
|
@ -369,6 +385,17 @@ static void showFsioInfo(void) {
|
|||
showFsio("fan", radiatorFanLogic);
|
||||
showFsio("alt", alternatorLogic);
|
||||
|
||||
for (int i = 0; i < AUX_PID_COUNT ; i++) {
|
||||
brain_pin_e pin = engineConfiguration->auxPidPins[i];
|
||||
if (pin != GPIO_UNASSIGNED) {
|
||||
scheduleMsg(logger, "FSIO aux #%d [%s]", (i + 1),
|
||||
hwPortname(pin));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||
char * exp = config->le_formulas[i];
|
||||
if (exp[0] != 0) {
|
||||
|
@ -488,6 +515,7 @@ void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
|||
}
|
||||
}
|
||||
|
||||
addConsoleActionSS("set_fsio_pid_output_pin", (VoidCharPtrCharPtr) setFsioPidOutputPin);
|
||||
addConsoleActionSS("set_fsio_output_pin", (VoidCharPtrCharPtr) setFsioOutputPin);
|
||||
addConsoleActionII("set_fsio_output_frequency", (VoidIntInt) setFsioFrequency);
|
||||
addConsoleActionSS("set_fsio_input_pin", (VoidCharPtrCharPtr) setFsioInputPin);
|
||||
|
|
|
@ -623,9 +623,7 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
|||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||
|
||||
#if EFI_MALFUNCTION_INDICATOR || defined(__DOXYGEN__)
|
||||
if (engineConfiguration->isMilEnabled) {
|
||||
initMalfunctionIndicator();
|
||||
}
|
||||
initMalfunctionIndicator();
|
||||
#endif /* EFI_MALFUNCTION_INDICATOR */
|
||||
|
||||
#if EFI_MAP_AVERAGING || defined(__DOXYGEN__)
|
||||
|
|
|
@ -33,13 +33,13 @@
|
|||
|
||||
#if EFI_MALFUNCTION_INDICATOR || defined(__DOXYGEN__)
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
#define MFI_LONG_BLINK 1500
|
||||
#define MFI_SHORT_BLINK 400
|
||||
#define MFI_BLINK_SEPARATOR 400
|
||||
#define MFI_CHECKENGINE_LIGHT 10000
|
||||
|
||||
extern EnginePins enginePins;
|
||||
|
||||
static THD_WORKING_AREA(mfiThreadStack, UTILITY_THREAD_STACK_SIZE); // declare thread
|
||||
|
||||
static void blink_digits(int digit, int duration) {
|
||||
|
@ -88,7 +88,7 @@ __attribute__((noreturn)) static msg_t mfiThread(void)
|
|||
chRegSetThreadName("MFIndicator");
|
||||
error_codes_set_s localErrorCopy;
|
||||
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
chThdSleepSeconds(10);
|
||||
|
||||
getErrorCodes(&localErrorCopy);
|
||||
|
@ -105,7 +105,14 @@ static void testMil(void) {
|
|||
addError(OBD_Intake_Air_Temperature_Circuit_Malfunction);
|
||||
}
|
||||
|
||||
bool isMilEnabled() {
|
||||
return boardConfiguration->malfunctionIndicatorPin != GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
void initMalfunctionIndicator(void) {
|
||||
if (!isMilEnabled()) {
|
||||
return;
|
||||
}
|
||||
// create static thread
|
||||
chThdCreateStatic(mfiThreadStack, sizeof(mfiThreadStack), LOWPRIO, (tfunc_t) mfiThread, NULL);
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#if EFI_MALFUNCTION_INDICATOR || defined(__DOXYGEN__)
|
||||
|
||||
bool isMilEnabled();
|
||||
void initMalfunctionIndicator(void);
|
||||
|
||||
#endif /* EFI_MALFUNCTION_INDICATOR */
|
||||
|
|
|
@ -256,9 +256,8 @@ void printConfiguration(engine_configuration_s *engineConfiguration) {
|
|||
|
||||
printOutputs(engineConfiguration);
|
||||
|
||||
scheduleMsg(&logger, "map_avg=%s/mil=%s/fp=%s/ts=%s/wa=%s/it=%s/fastAdc=%s",
|
||||
boolToString(engineConfiguration->isMapAveragingEnabled), boolToString(engineConfiguration->isMilEnabled),
|
||||
boolToString(engineConfiguration->isFuelPumpEnabled),
|
||||
scheduleMsg(&logger, "map_avg=%s/ts=%s/wa=%s/it=%s/fastAdc=%s",
|
||||
boolToString(engineConfiguration->isMapAveragingEnabled),
|
||||
boolToString(engineConfiguration->isTunerStudioEnabled),
|
||||
boolToString(engineConfiguration->isWaveAnalyzerEnabled),
|
||||
boolToString(engineConfiguration->isIdleThreadEnabled), boolToString(boardConfiguration->isFastAdcEnabled));
|
||||
|
@ -889,10 +888,6 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
|||
boardConfiguration->isEngineControlEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "map_avg")) {
|
||||
engineConfiguration->isMapAveragingEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "mil")) {
|
||||
engineConfiguration->isMilEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "fuel_pump")) {
|
||||
engineConfiguration->isFuelPumpEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "tunerstudio")) {
|
||||
engineConfiguration->isTunerStudioEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "wave_analyzer")) {
|
||||
|
|
|
@ -601,12 +601,12 @@ custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "false", "true"
|
|||
|
||||
bit isInjectionEnabled;+enable injection
|
||||
bit isIgnitionEnabled;+enable ignition
|
||||
bit isCylinderCleanupEnabled;+If TPS above 95% no fuel would be injected during cranking
|
||||
bit isCylinderCleanupEnabled;+If TPS above 95% no fuel would be injected during cranking\nenable cylinder_cleanup
|
||||
bit secondTriggerChannelEnabled
|
||||
bit needSecondTriggerInputDeprecated
|
||||
bit isMapAveragingEnabled
|
||||
bit isMilEnabled;+enable mil
|
||||
bit isFuelPumpEnabled
|
||||
bit anotherUnusedBit1
|
||||
bit anotherUnusedBit2
|
||||
bit isTunerStudioEnabled
|
||||
bit isWaveAnalyzerEnabled
|
||||
bit isIdleThreadEnabled
|
||||
|
|
|
@ -42,7 +42,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 12:09:43 EST 2016
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 23:08:47 EST 2016
|
||||
|
||||
pageSize = 16376
|
||||
page = 1
|
||||
|
@ -450,8 +450,8 @@ page = 1
|
|||
secondTriggerChannelEnabled= bits, U32, 1500, [3:3], "false", "true"
|
||||
needSecondTriggerInputDeprecated= bits, U32, 1500, [4:4], "false", "true"
|
||||
isMapAveragingEnabled = bits, U32, 1500, [5:5], "false", "true"
|
||||
isMilEnabled = bits, U32, 1500, [6:6], "false", "true"
|
||||
isFuelPumpEnabled = bits, U32, 1500, [7:7], "false", "true"
|
||||
anotherUnusedBit1 = bits, U32, 1500, [6:6], "false", "true"
|
||||
anotherUnusedBit2 = bits, U32, 1500, [7:7], "false", "true"
|
||||
isTunerStudioEnabled = bits, U32, 1500, [8:8], "false", "true"
|
||||
isWaveAnalyzerEnabled = bits, U32, 1500, [9:9], "false", "true"
|
||||
isIdleThreadEnabled = bits, U32, 1500, [10:10], "false", "true"
|
||||
|
@ -737,8 +737,7 @@ page = 1
|
|||
sensorChartMode = "rusEfi console Sensor Sniffer mode"
|
||||
isInjectionEnabled = "enable injection"
|
||||
isIgnitionEnabled = "enable ignition"
|
||||
isCylinderCleanupEnabled = "If TPS above 95% no fuel would be injected during cranking"
|
||||
isMilEnabled = "enable mil"
|
||||
isCylinderCleanupEnabled = "If TPS above 95% no fuel would be injected during cranking\nenable cylinder_cleanup"
|
||||
isPrintTriggerSynchDetails = "enable trigger_details"
|
||||
twoWireBatchInjection = "This is needed if batched injection and individual injector wiring\nenable two_wire_batch_injection"
|
||||
useOnlyRisingEdgeForTrigger = "VR sensors are only precise on rising front"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 12:09:43 EST 2016
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 27 23:08:47 EST 2016
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int FSIO_ADC_COUNT = 4;
|
||||
|
@ -648,8 +648,8 @@ public class Fields {
|
|||
public static final int secondTriggerChannelEnabled_offset = 1500;
|
||||
public static final int needSecondTriggerInputDeprecated_offset = 1500;
|
||||
public static final int isMapAveragingEnabled_offset = 1500;
|
||||
public static final int isMilEnabled_offset = 1500;
|
||||
public static final int isFuelPumpEnabled_offset = 1500;
|
||||
public static final int anotherUnusedBit1_offset = 1500;
|
||||
public static final int anotherUnusedBit2_offset = 1500;
|
||||
public static final int isTunerStudioEnabled_offset = 1500;
|
||||
public static final int isWaveAnalyzerEnabled_offset = 1500;
|
||||
public static final int isIdleThreadEnabled_offset = 1500;
|
||||
|
@ -1401,8 +1401,8 @@ public class Fields {
|
|||
public static final Field SECONDTRIGGERCHANNELENABLED = Field.create("SECONDTRIGGERCHANNELENABLED", 1500, FieldType.BIT, 3);
|
||||
public static final Field NEEDSECONDTRIGGERINPUTDEPRECATED = Field.create("NEEDSECONDTRIGGERINPUTDEPRECATED", 1500, FieldType.BIT, 4);
|
||||
public static final Field ISMAPAVERAGINGENABLED = Field.create("ISMAPAVERAGINGENABLED", 1500, FieldType.BIT, 5);
|
||||
public static final Field ISMILENABLED = Field.create("ISMILENABLED", 1500, FieldType.BIT, 6);
|
||||
public static final Field ISFUELPUMPENABLED = Field.create("ISFUELPUMPENABLED", 1500, FieldType.BIT, 7);
|
||||
public static final Field ANOTHERUNUSEDBIT1 = Field.create("ANOTHERUNUSEDBIT1", 1500, FieldType.BIT, 6);
|
||||
public static final Field ANOTHERUNUSEDBIT2 = Field.create("ANOTHERUNUSEDBIT2", 1500, FieldType.BIT, 7);
|
||||
public static final Field ISTUNERSTUDIOENABLED = Field.create("ISTUNERSTUDIOENABLED", 1500, FieldType.BIT, 8);
|
||||
public static final Field ISWAVEANALYZERENABLED = Field.create("ISWAVEANALYZERENABLED", 1500, FieldType.BIT, 9);
|
||||
public static final Field ISIDLETHREADENABLED = Field.create("ISIDLETHREADENABLED", 1500, FieldType.BIT, 10);
|
||||
|
|
Loading…
Reference in New Issue