mirror of https://github.com/rusefi/rusefi-1.git
reducing code duplication
This commit is contained in:
parent
7537074482
commit
656331ebe9
|
@ -200,13 +200,6 @@ void setIdleValvePosition(int positionPercent) {
|
|||
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
/**
|
||||
* clamps value into the [0, 100] range
|
||||
*/
|
||||
percent_t clampPercentValue(percent_t value) {
|
||||
return maxF(minF(value, 100), 0);
|
||||
}
|
||||
|
||||
static percent_t manualIdleController(float cltCorrection DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
||||
percent_t correctedPosition = cltCorrection * CONFIG(manIdlePosition);
|
||||
|
|
|
@ -63,6 +63,11 @@ char* itoa10(char *p, int num);
|
|||
bool isSameF(float v1, float v2);
|
||||
float clampF(float min, float clamp, float max);
|
||||
|
||||
/**
|
||||
* clamps value into the [0, 100] range
|
||||
*/
|
||||
#define clampPercentValue(x) (clampF(0, x, 100))
|
||||
|
||||
bool strEqualCaseInsensitive(const char *str1, const char *str2);
|
||||
bool strEqual(const char *str1, const char *str2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue