fix #502
This commit is contained in:
parent
caf2846a59
commit
73184cd830
|
@ -16,6 +16,7 @@
|
||||||
#include "aux_valves.h"
|
#include "aux_valves.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "trigger_central.h"
|
#include "trigger_central.h"
|
||||||
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
@ -48,13 +49,16 @@ static void auxValveTriggerCallback(trigger_event_e ckpSignalType,
|
||||||
NamedOutputPin *output = &enginePins.auxValve[valveIndex];
|
NamedOutputPin *output = &enginePins.auxValve[valveIndex];
|
||||||
|
|
||||||
for (int phaseIndex = 0; phaseIndex < 2; phaseIndex++) {
|
for (int phaseIndex = 0; phaseIndex < 2; phaseIndex++) {
|
||||||
float extra = phaseIndex * 360 + valveIndex * 180;
|
angle_t extra = phaseIndex * 360 + valveIndex * 180;
|
||||||
|
angle_t onTime = extra + engine->engineState.auxValveStart;
|
||||||
|
fixAngle(onTime, "onTime");
|
||||||
scheduleByAngle(rpm, &turnOnEvent[valveIndex][phaseIndex],
|
scheduleByAngle(rpm, &turnOnEvent[valveIndex][phaseIndex],
|
||||||
extra + engine->engineState.auxValveStart,
|
onTime,
|
||||||
(schfunc_t) &turnOn, output, &engine->rpmCalculator);
|
(schfunc_t) &turnOn, output, &engine->rpmCalculator);
|
||||||
|
angle_t offTime = extra + engine->engineState.auxValveEnd;
|
||||||
|
fixAngle(offTime, "offTime");
|
||||||
scheduleByAngle(rpm, &turnOffEvent[valveIndex][phaseIndex],
|
scheduleByAngle(rpm, &turnOffEvent[valveIndex][phaseIndex],
|
||||||
extra + engine->engineState.auxValveEnd,
|
offTime,
|
||||||
(schfunc_t) &turnOff, output, &engine->rpmCalculator);
|
(schfunc_t) &turnOff, output, &engine->rpmCalculator);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,5 +260,5 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20171127;
|
return 20171201;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue