mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
72607fc12c
commit
6b8aa569e0
|
@ -37,8 +37,8 @@ case GPIO_7:
|
||||||
return "GPIO_7";
|
return "GPIO_7";
|
||||||
case FAN_RELAY:
|
case FAN_RELAY:
|
||||||
return "FAN_RELAY";
|
return "FAN_RELAY";
|
||||||
case AC_RElAY:
|
case AC_RELAY:
|
||||||
return "AC_RElAY";
|
return "AC_RELAY";
|
||||||
case INJECTOR_8_OUTPUT:
|
case INJECTOR_8_OUTPUT:
|
||||||
return "INJECTOR_8_OUTPUT";
|
return "INJECTOR_8_OUTPUT";
|
||||||
case GPIO_6:
|
case GPIO_6:
|
||||||
|
|
|
@ -124,7 +124,7 @@ typedef enum {
|
||||||
FUEL_PUMP_RELAY,
|
FUEL_PUMP_RELAY,
|
||||||
FAN_RELAY,
|
FAN_RELAY,
|
||||||
O2_HEATER,
|
O2_HEATER,
|
||||||
AC_RElAY,
|
AC_RELAY,
|
||||||
|
|
||||||
SPI_CS_1,
|
SPI_CS_1,
|
||||||
SPI_CS_2,
|
SPI_CS_2,
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
// todo: the delay should probably be configurable?
|
// todo: the delay should probably be configurable?
|
||||||
#define FUEL_PUMP_LOGIC "time_since_boot 4 < rpm 0 > OR"
|
#define FUEL_PUMP_LOGIC "time_since_boot 4 < rpm 0 > OR"
|
||||||
|
|
||||||
|
#define AC_RELAY_LOGIC "ac_on_switch"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In human language that's
|
* In human language that's
|
||||||
* (fan and (coolant > fan_off_setting)) OR (coolant > fan_on_setting)
|
* (fan and (coolant > fan_off_setting)) OR (coolant > fan_on_setting)
|
||||||
|
|
|
@ -61,6 +61,7 @@ static LECalculator calc;
|
||||||
static LEElement mainPool[LE_ELEMENT_POOL_SIZE];
|
static LEElement mainPool[LE_ELEMENT_POOL_SIZE];
|
||||||
static LEElementPool lePool(mainPool, LE_ELEMENT_POOL_SIZE);
|
static LEElementPool lePool(mainPool, LE_ELEMENT_POOL_SIZE);
|
||||||
|
|
||||||
|
static LEElement * acRelayLogic;
|
||||||
static LEElement * fuelPumpLogic;
|
static LEElement * fuelPumpLogic;
|
||||||
static LEElement * radiatorFanLogic;
|
static LEElement * radiatorFanLogic;
|
||||||
|
|
||||||
|
@ -242,6 +243,10 @@ static void onEvenyGeneralMilliseconds(Engine *engine) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (boardConfiguration->acRelayPin != GPIO_UNASSIGNED) {
|
||||||
|
setPinState(AC_RELAY, acRelayLogic, engine);
|
||||||
|
}
|
||||||
|
|
||||||
updateErrorCodes();
|
updateErrorCodes();
|
||||||
|
|
||||||
// todo: migrate this to flex logic
|
// todo: migrate this to flex logic
|
||||||
|
@ -408,6 +413,8 @@ void initEngineContoller(Engine *engine) {
|
||||||
fuelPumpLogic = lePool.parseExpression(FUEL_PUMP_LOGIC);
|
fuelPumpLogic = lePool.parseExpression(FUEL_PUMP_LOGIC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
acRelayLogic = lePool.parseExpression(AC_RELAY_LOGIC);
|
||||||
|
|
||||||
addConsoleAction("analoginfo", printAnalogInfo);
|
addConsoleAction("analoginfo", printAnalogInfo);
|
||||||
|
|
||||||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||||
|
|
|
@ -332,7 +332,7 @@ static void printTemperatureInfo(void) {
|
||||||
scheduleMsg(&logger, "fan=%s @ %s", boolToString(getOutputPinValue(FAN_RELAY)),
|
scheduleMsg(&logger, "fan=%s @ %s", boolToString(getOutputPinValue(FAN_RELAY)),
|
||||||
hwPortname(boardConfiguration->fanPin));
|
hwPortname(boardConfiguration->fanPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "A/C relay=%s @ %s", boolToString(getOutputPinValue(AC_RElAY)),
|
scheduleMsg(&logger, "A/C relay=%s @ %s", boolToString(getOutputPinValue(AC_RELAY)),
|
||||||
hwPortname(boardConfiguration->acRelayPin));
|
hwPortname(boardConfiguration->acRelayPin));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ void initOutputPins(void) {
|
||||||
outputPinRegisterExt2("fan relay", FAN_RELAY, boardConfiguration->fanPin, &DEFAULT_OUTPUT);
|
outputPinRegisterExt2("fan relay", FAN_RELAY, boardConfiguration->fanPin, &DEFAULT_OUTPUT);
|
||||||
outputPinRegisterExt2("o2 heater", O2_HEATER, boardConfiguration->o2heaterPin, &DEFAULT_OUTPUT);
|
outputPinRegisterExt2("o2 heater", O2_HEATER, boardConfiguration->o2heaterPin, &DEFAULT_OUTPUT);
|
||||||
outputPinRegisterExt2("trg_err", LED_TRIGGER_ERROR, boardConfiguration->triggerErrorPin, &boardConfiguration->triggerErrorPinMode);
|
outputPinRegisterExt2("trg_err", LED_TRIGGER_ERROR, boardConfiguration->triggerErrorPin, &boardConfiguration->triggerErrorPinMode);
|
||||||
outputPinRegisterExt2("A/C relay", AC_RElAY, boardConfiguration->acRelayPin, &boardConfiguration->acRelayPinMode);
|
outputPinRegisterExt2("A/C relay", AC_RELAY, boardConfiguration->acRelayPin, &boardConfiguration->acRelayPinMode);
|
||||||
|
|
||||||
initialLedsBlink();
|
initialLedsBlink();
|
||||||
|
|
||||||
|
|
|
@ -265,5 +265,5 @@ int getRusEfiVersion(void) {
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE == 0)
|
if (UNUSED_CCM_SIZE == 0)
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
return 20141126;
|
return 20141129;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue