parent
a3b10a0a04
commit
4005cc83cc
|
@ -104,7 +104,7 @@ static msg_t csThread(void) {
|
|||
while (true) {
|
||||
int rpm = getRpmE(engine);
|
||||
int is_cranking = ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
int is_running = rpm > 0 && !is_cranking;
|
||||
bool is_running = ENGINE(rpmCalculator).isRunning(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
if (is_running) {
|
||||
// blinking while running
|
||||
enginePins.runningPin.setValue(0);
|
||||
|
|
|
@ -50,6 +50,7 @@ RpmCalculator::RpmCalculator() {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
rpmValue = 0;
|
||||
assignRpmValue(0);
|
||||
state = STOPPED;
|
||||
|
||||
// we need this initial to have not_running at first invocation
|
||||
lastRpmEventTimeNt = (efitime_t) -10 * US2NT(US_PER_SECOND_LL);
|
||||
|
|
|
@ -128,8 +128,6 @@ float getCrankshaftAngleNt(efitime_t timeNt DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|||
|
||||
int getRevolutionCounter(void);
|
||||
|
||||
bool isCranking(void);
|
||||
|
||||
#define isValidRpm(rpm) ((rpm) > 0 && (rpm) < UNREALISTIC_RPM)
|
||||
|
||||
#if EFI_ENGINE_SNIFFER
|
||||
|
|
Loading…
Reference in New Issue