2022-12-16 15:58:39 -08:00
|
|
|
/*
|
|
|
|
* @file antilag_system.h
|
|
|
|
*
|
|
|
|
* @date 26. nov. 2022
|
|
|
|
* Author: Turbo Marian
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "timer.h"
|
|
|
|
#include "antilag_system_state_generated.h"
|
|
|
|
|
|
|
|
void initAntilagSystem();
|
|
|
|
|
|
|
|
class AntilagSystemBase : public antilag_system_state_s {
|
|
|
|
public:
|
|
|
|
void update();
|
|
|
|
|
2022-12-31 11:48:09 -08:00
|
|
|
bool isALSMinRPMCondition(int rpm) const;
|
|
|
|
bool isALSMaxRPMCondition(int 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();
|
2022-12-27 16:37:33 -08:00
|
|
|
/* enabled and all conditions above */
|
2022-12-31 11:48:09 -08:00
|
|
|
bool isAntilagConditionMet(int rpm);
|
2022-12-16 15:58:39 -08:00
|
|
|
};
|