diff --git a/Core/Src/params.c b/Core/Src/params.c index 807c5fa..9397194 100644 --- a/Core/Src/params.c +++ b/Core/Src/params.c @@ -6,7 +6,7 @@ * Decrements the given value if it is above the minimum allowed value */ #define DEC_IF_ABOVE(param_val, min_val, decr_amt) ((param_val) = ((param_val) - (decr_amt) ) > (min_val) ? ((param_val) - (decr_amt)) : (min_val)) -#define INC_IF_BELOW(param_val, max_val, incr_amt) ((param_val) = ((param_val) + (incr_amt)) > (max_val) ? ((param_val) + (incr_amt)) : (max_val)) +#define INC_IF_BELOW(param_val, max_val, incr_amt) ((param_val) = ((param_val) + (incr_amt)) < (max_val) ? ((param_val) + (incr_amt)) : (max_val)) Params params = {0}; diff --git a/TouchGFX/gui/src/common/NamedField.cpp b/TouchGFX/gui/src/common/NamedField.cpp index 579cdb3..a1a77d2 100644 --- a/TouchGFX/gui/src/common/NamedField.cpp +++ b/TouchGFX/gui/src/common/NamedField.cpp @@ -336,7 +336,7 @@ static_assert(sizeof(dataFieldDescs) / sizeof(dataFieldDescs[0]) == NamedFieldDescription paramFieldDescs[] = { [PF_PLIM] = {NamedFieldKind::Int, "PLIM", 2, 0, PARAM_FIELD(plim)}, - [PF_TLIM] = {NamedFieldKind::Int, "TLIM", 2, 1, PARAM_FIELD(plim)}, + [PF_TLIM] = {NamedFieldKind::Int, "TLIM", 4, 1, PARAM_FIELD(plim)}, [PF_SLIM] = {NamedFieldKind::Int, "SLIM", 2, 2, PARAM_FIELD(slim)}, [PF_TVEC] = {NamedFieldKind::Int, "TVEC", 2, 1, PARAM_FIELD(tvec)}, [PF_PG] = {NamedFieldKind::Int, "PG", 2, 0, PARAM_FIELD(pg)},