auto-sync
This commit is contained in:
parent
4afecfc1e8
commit
8e18c457c7
|
@ -299,6 +299,9 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
boardConfiguration->acRelayPin = GPIO_UNASSIGNED;
|
||||
boardConfiguration->acRelayPinMode = OM_DEFAULT;
|
||||
|
||||
boardConfiguration->alternatorControlPin = GPIO_UNASSIGNED;
|
||||
boardConfiguration->alternatorControlPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->acSwitchAdc = EFI_ADC_NONE;
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#define AC_RELAY_LOGIC "ac_on_switch"
|
||||
|
||||
#define ALTERNATOR_LOGIC "vbatt 14.5 <"
|
||||
|
||||
/**
|
||||
* In human language that's
|
||||
* (fan and (coolant > fan_off_setting)) OR (coolant > fan_on_setting)
|
||||
|
|
|
@ -64,6 +64,7 @@ static LEElementPool lePool(mainPool, LE_ELEMENT_POOL_SIZE);
|
|||
static LEElement * acRelayLogic;
|
||||
static LEElement * fuelPumpLogic;
|
||||
static LEElement * radiatorFanLogic;
|
||||
static LEElement * alternatorLogic;
|
||||
|
||||
extern OutputPin outputs[IO_PIN_COUNT];
|
||||
extern pin_output_mode_e *pinDefaultState[IO_PIN_COUNT];
|
||||
|
@ -251,6 +252,10 @@ static void onEvenyGeneralMilliseconds(Engine *engine) {
|
|||
setPinState(AC_RELAY, acRelayLogic, engine);
|
||||
}
|
||||
|
||||
if (boardConfiguration->alternatorControlPin != GPIO_UNASSIGNED) {
|
||||
setPinState(ALTERNATOR_SWITCH, alternatorLogic, engine);
|
||||
}
|
||||
|
||||
updateErrorCodes();
|
||||
|
||||
// todo: migrate this to flex logic
|
||||
|
@ -419,6 +424,8 @@ void initEngineContoller(Engine *engine) {
|
|||
|
||||
acRelayLogic = lePool.parseExpression(AC_RELAY_LOGIC);
|
||||
|
||||
alternatorLogic = lePool.parseExpression(ALTERNATOR_LOGIC);
|
||||
|
||||
addConsoleAction("analoginfo", printAnalogInfo);
|
||||
|
||||
for (int i = 0; i < LE_COMMAND_COUNT; i++) {
|
||||
|
|
|
@ -265,5 +265,5 @@ int getRusEfiVersion(void) {
|
|||
return 1; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE == 0)
|
||||
return 1; // this is here to make the compiler happy about the unused array
|
||||
return 20141129;
|
||||
return 20141130;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue