auto-sync

This commit is contained in:
rusEfi 2014-11-30 10:04:02 -06:00
parent 4afecfc1e8
commit 8e18c457c7
4 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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)

View File

@ -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++) {

View File

@ -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;
}