From 148090c1758c34f54aadbb6f7bad98575488512f Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Thu, 23 Apr 2020 11:49:23 +0200 Subject: [PATCH] Fix lint issues --- srcs/pressure_controller.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/srcs/pressure_controller.cpp b/srcs/pressure_controller.cpp index 4265e3cb..c99a291c 100644 --- a/srcs/pressure_controller.cpp +++ b/srcs/pressure_controller.cpp @@ -453,10 +453,13 @@ void PressureController::updatePeakPressure() { DBG_DO(Serial.println("Plateau detected");) if (abs(plateauDelta) > 20) { - m_maxPeakPressureCommand = min( min(m_peakPressure, m_maxPeakPressureCommand) + plateauDelta, CONST_MAX_PEAK_PRESSURE); + m_maxPeakPressureCommand = + min(min(m_peakPressure, m_maxPeakPressureCommand) + plateauDelta, + static_cast(CONST_MAX_PEAK_PRESSURE)); } else if ((abs(plateauDelta) < 20) && (abs(plateauDelta) > 5)) { m_maxPeakPressureCommand = - min( min(m_peakPressure, m_maxPeakPressureCommand) + (plateauDelta / 2), CONST_MAX_PEAK_PRESSURE); + min(min(m_peakPressure, m_maxPeakPressureCommand) + (plateauDelta / 2), + static_cast(CONST_MAX_PEAK_PRESSURE)); } else { // Do nothing }