rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
max_limit_with_hysteresis.h
Go to the documentation of this file.
1//
2// Created by kifir on 8/20/24.
3//
4
5#pragma once
6
7#include "hysteresis.h"
8
9template <typename RisingChecker = StrictChecker, typename FallingChecker = StrictChecker>
11public:
12 bool checkIfLimitIsExceeded(const float value, const float maxLimit, const float hysteresis);
13private:
15};
16
17template <typename RisingChecker, typename FallingChecker>
19 const float value,
20 const float maxLimit,
21 const float hysteresis
22) {
23 return m_hysteresis.test<RisingChecker, FallingChecker>(value, maxLimit, maxLimit - hysteresis);
24}
bool checkIfLimitIsExceeded(const float value, const float maxLimit, const float hysteresis)