Starter is engaged on start-up in pull-up configuration #1969
This commit is contained in:
parent
fb0863a1be
commit
641959b9a3
|
@ -79,6 +79,7 @@ class Engine final : public TriggerStateListener {
|
||||||
public:
|
public:
|
||||||
explicit Engine(persistent_config_s *config);
|
explicit Engine(persistent_config_s *config);
|
||||||
Engine();
|
Engine();
|
||||||
|
bool isPwmEnabled = true;
|
||||||
|
|
||||||
IEtbController *etbControllers[ETB_COUNT] = {nullptr};
|
IEtbController *etbControllers[ETB_COUNT] = {nullptr};
|
||||||
IFuelComputer *fuelComputer = nullptr;
|
IFuelComputer *fuelComputer = nullptr;
|
||||||
|
|
|
@ -898,6 +898,8 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
engineConfiguration->canWriteEnabled = isEnabled;
|
engineConfiguration->canWriteEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, CMD_INJECTION)) {
|
} else if (strEqualCaseInsensitive(param, CMD_INJECTION)) {
|
||||||
engineConfiguration->isInjectionEnabled = isEnabled;
|
engineConfiguration->isInjectionEnabled = isEnabled;
|
||||||
|
} else if (strEqualCaseInsensitive(param, CMD_PWM)) {
|
||||||
|
engine->isPwmEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "trigger_details")) {
|
} else if (strEqualCaseInsensitive(param, "trigger_details")) {
|
||||||
engineConfiguration->verboseTriggerSynchDetails = isEnabled;
|
engineConfiguration->verboseTriggerSynchDetails = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "vvt_details")) {
|
} else if (strEqualCaseInsensitive(param, "vvt_details")) {
|
||||||
|
|
|
@ -13,9 +13,12 @@
|
||||||
#include "pwm_generator_logic.h"
|
#include "pwm_generator_logic.h"
|
||||||
#include "perf_trace.h"
|
#include "perf_trace.h"
|
||||||
|
|
||||||
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
#include "mpu_util.h"
|
#include "mpu_util.h"
|
||||||
#endif
|
#include "engine.h"
|
||||||
|
#endif // EFI_PROD_CODE
|
||||||
|
|
||||||
// 1% duty cycle
|
// 1% duty cycle
|
||||||
#define ZERO_PWM_THRESHOLD 0.01
|
#define ZERO_PWM_THRESHOLD 0.01
|
||||||
|
@ -375,6 +378,16 @@ void startSimplePwmHard(SimplePwm *state, const char *msg,
|
||||||
* This method takes ~350 ticks.
|
* This method takes ~350 ticks.
|
||||||
*/
|
*/
|
||||||
void applyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_callback */ {
|
void applyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_callback */ {
|
||||||
|
#if EFI_PROD_CODE
|
||||||
|
if (!engine->isPwmEnabled) {
|
||||||
|
for (int channelIndex = 0; channelIndex < state->multiChannelStateSequence.waveCount; channelIndex++) {
|
||||||
|
OutputPin *output = state->outputPins[channelIndex];
|
||||||
|
output->setValue(0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif // EFI_PROD_CODE
|
||||||
|
|
||||||
efiAssertVoid(CUSTOM_ERR_6663, stateIndex < PWM_PHASE_MAX_COUNT, "invalid stateIndex");
|
efiAssertVoid(CUSTOM_ERR_6663, stateIndex < PWM_PHASE_MAX_COUNT, "invalid stateIndex");
|
||||||
efiAssertVoid(CUSTOM_ERR_6664, state->multiChannelStateSequence.waveCount <= PWM_PHASE_MAX_WAVE_PER_PWM, "invalid waveCount");
|
efiAssertVoid(CUSTOM_ERR_6664, state->multiChannelStateSequence.waveCount <= PWM_PHASE_MAX_WAVE_PER_PWM, "invalid waveCount");
|
||||||
for (int channelIndex = 0; channelIndex < state->multiChannelStateSequence.waveCount; channelIndex++) {
|
for (int channelIndex = 0; channelIndex < state->multiChannelStateSequence.waveCount; channelIndex++) {
|
||||||
|
|
Loading…
Reference in New Issue