harley
This commit is contained in:
parent
d791ef5581
commit
0aaf9ccdc2
|
@ -913,7 +913,7 @@ function onTick()
|
||||||
--print('Rpm ' .. rpm)
|
--print('Rpm ' .. rpm)
|
||||||
--print('getTimeSinceTriggerEventMs ' .. getTimeSinceTriggerEventMs())
|
--print('getTimeSinceTriggerEventMs ' .. getTimeSinceTriggerEventMs())
|
||||||
enableCompressionReleaseSolenoid = getTimeSinceTriggerEventMs() < compReleaseDulationLimit and rpm < rpmLimitSetting
|
enableCompressionReleaseSolenoid = getTimeSinceTriggerEventMs() < compReleaseDulationLimit and rpm < rpmLimitSetting
|
||||||
duty = enableCompressionReleaseSolenoid and 100 or 0
|
duty = enableCompressionReleaseSolenoid and 1 or 0
|
||||||
print("Compression release solenoid " .. duty)
|
print("Compression release solenoid " .. duty)
|
||||||
setPwmDuty(outputIndex, duty)
|
setPwmDuty(outputIndex, duty)
|
||||||
else
|
else
|
||||||
|
|
|
@ -336,6 +336,9 @@ void startSimplePwmExt(SimplePwm *state, const char *msg,
|
||||||
startSimplePwm(state, msg, executor, output, frequency, dutyCycle);
|
startSimplePwm(state, msg, executor, output, frequency, dutyCycle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dutyCycle value between 0 and 1
|
||||||
|
*/
|
||||||
void startSimplePwmHard(SimplePwm *state, const char *msg,
|
void startSimplePwmHard(SimplePwm *state, const char *msg,
|
||||||
ExecutorInterface *executor,
|
ExecutorInterface *executor,
|
||||||
brain_pin_e brainPin, OutputPin *output, float frequency,
|
brain_pin_e brainPin, OutputPin *output, float frequency,
|
||||||
|
|
Loading…
Reference in New Issue