Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistejamin authored and Keruspe committed May 2, 2020
1 parent 67d8f1c commit 148090c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions srcs/pressure_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(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<int>(CONST_MAX_PEAK_PRESSURE));
} else {
// Do nothing
}
Expand Down

0 comments on commit 148090c

Please sign in to comment.