rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
controllers
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
9
template
<
typename
RisingChecker = StrictChecker,
typename
FallingChecker = StrictChecker>
10
class
MaxLimitWithHysteresis
{
11
public
:
12
bool
checkIfLimitIsExceeded
(
const
float
value,
const
float
maxLimit,
const
float
hysteresis);
13
private
:
14
Hysteresis
m_hysteresis
;
15
};
16
17
template
<
typename
RisingChecker,
typename
FallingChecker>
18
bool
MaxLimitWithHysteresis<RisingChecker, FallingChecker>::checkIfLimitIsExceeded
(
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
}
Hysteresis
Definition
hysteresis.h:19
MaxLimitWithHysteresis
Definition
max_limit_with_hysteresis.h:10
MaxLimitWithHysteresis::m_hysteresis
Hysteresis m_hysteresis
Definition
max_limit_with_hysteresis.h:14
MaxLimitWithHysteresis::checkIfLimitIsExceeded
bool checkIfLimitIsExceeded(const float value, const float maxLimit, const float hysteresis)
Definition
max_limit_with_hysteresis.h:18
hysteresis.h
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8