Fan not be able to be set because in use at VR PWM fix #5565
only:reducing confusion
This commit is contained in:
parent
48935d2d01
commit
2f907af198
|
@ -149,7 +149,7 @@ void Engine::periodicSlowCallback() {
|
|||
|
||||
tpsAccelEnrichment.onNewValue(Sensor::getOrZero(SensorType::Tps1));
|
||||
|
||||
updateVrPwm();
|
||||
updateVrThresholdPwm();
|
||||
|
||||
enginePins.o2heater.setValue(engineConfiguration->forceO2Heating || engine->rpmCalculator.isRunning());
|
||||
enginePins.starterRelayDisable.setValue(Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm);
|
||||
|
|
|
@ -674,7 +674,7 @@ void initEngineController() {
|
|||
|
||||
engineStateBlinkingTask.start();
|
||||
|
||||
initVrPwm();
|
||||
initVrThresholdPwm();
|
||||
|
||||
#if EFI_PWM_TESTER
|
||||
initPwmTester();
|
||||
|
|
|
@ -10,7 +10,7 @@ static SimplePwm pwms[VR_THRESHOLD_COUNT];
|
|||
#define VR_SUPPLY_VOLTAGE 3.3f
|
||||
#endif
|
||||
|
||||
static void updateVrPwm(int rpm, size_t index) {
|
||||
static void updateVrThresholdPwm(int rpm, size_t index) {
|
||||
auto& cfg = engineConfiguration->vrThreshold[index];
|
||||
|
||||
if (!isBrainPinValid(cfg.pin)) {
|
||||
|
@ -28,15 +28,15 @@ static void updateVrPwm(int rpm, size_t index) {
|
|||
pwms[index].setSimplePwmDutyCycle(duty);
|
||||
}
|
||||
|
||||
void updateVrPwm() {
|
||||
void updateVrThresholdPwm() {
|
||||
auto rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
|
||||
for (size_t i = 0; i < efi::size(engineConfiguration->vrThreshold); i++) {
|
||||
updateVrPwm(rpm, i);
|
||||
updateVrThresholdPwm(rpm, i);
|
||||
}
|
||||
}
|
||||
|
||||
void initVrPwm() {
|
||||
void initVrThresholdPwm() {
|
||||
for (size_t i = 0; i < efi::size(engineConfiguration->vrThreshold); i++) {
|
||||
auto& cfg = engineConfiguration->vrThreshold[i];
|
||||
|
||||
|
@ -44,7 +44,7 @@ void initVrPwm() {
|
|||
continue;
|
||||
}
|
||||
|
||||
startSimplePwmHard(&pwms[i], "VR PWM",
|
||||
startSimplePwmHard(&pwms[i], "VR Threshold",
|
||||
&engine->executor,
|
||||
cfg.pin,
|
||||
&pins[i],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
void initVrPwm();
|
||||
void updateVrPwm();
|
||||
void initVrThresholdPwm();
|
||||
void updateVrThresholdPwm();
|
||||
void setDefaultVrThresholds();
|
||||
|
|
Loading…
Reference in New Issue