2022-12-16 15:58:39 -08:00
|
|
|
/*
|
|
|
|
* @file antilag_system.h
|
|
|
|
*
|
|
|
|
* @date 26. nov. 2022
|
|
|
|
* Author: Turbo Marian
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-08-30 20:11:24 -07:00
|
|
|
#include <rusefi/timer.h>
|
2022-12-16 15:58:39 -08:00
|
|
|
#include "antilag_system_state_generated.h"
|
|
|
|
|
|
|
|
void initAntilagSystem();
|
|
|
|
|
|
|
|
class AntilagSystemBase : public antilag_system_state_s {
|
|
|
|
public:
|
|
|
|
void update();
|
|
|
|
|
2024-09-25 00:16:53 -07:00
|
|
|
bool isALSMinRPMCondition(float rpm) const;
|
|
|
|
bool isALSMaxRPMCondition(float rpm) const;
|
2022-12-16 15:58:39 -08:00
|
|
|
bool isALSMinCLTCondition() const;
|
|
|
|
bool isALSMaxCLTCondition() const;
|
2022-12-27 16:37:33 -08:00
|
|
|
bool isALSMaxThrottleIntentCondition() const;
|
2022-12-16 15:58:39 -08:00
|
|
|
bool isInsideALSSwitchCondition();
|
2023-02-24 18:58:41 -08:00
|
|
|
bool isInsideALSTimerCondition();
|
2022-12-27 16:37:33 -08:00
|
|
|
/* enabled and all conditions above */
|
2024-09-25 00:16:53 -07:00
|
|
|
bool isAntilagConditionMet(float rpm);
|
2023-02-24 18:58:41 -08:00
|
|
|
|
|
|
|
private:
|
|
|
|
Timer ALStimer;
|
2022-12-16 15:58:39 -08:00
|
|
|
};
|