From adad6a3c7138c3a46053726f341fa952834473f3 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Mon, 23 Oct 2023 09:49:13 +0200 Subject: [PATCH] Fix warning detected on windows --- .../src/real-robot/pololu-maestro/vpServoPololuMaestro.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/robot/src/real-robot/pololu-maestro/vpServoPololuMaestro.cpp b/modules/robot/src/real-robot/pololu-maestro/vpServoPololuMaestro.cpp index 2645633653..2e8709d8aa 100644 --- a/modules/robot/src/real-robot/pololu-maestro/vpServoPololuMaestro.cpp +++ b/modules/robot/src/real-robot/pololu-maestro/vpServoPololuMaestro.cpp @@ -83,7 +83,7 @@ vpServoPololuMaestro::~vpServoPololuMaestro() int vpServoPololuMaestro::angle2PWM(float angle) { - return ((angle + abs(m_minAngle)) / m_rangeAngle) * m_rangePWM + m_minPWM; + return static_cast(((angle + abs(m_minAngle)) / m_rangeAngle) * m_rangePWM + m_minPWM); } bool vpServoPololuMaestro::checkConnection() @@ -99,7 +99,7 @@ bool vpServoPololuMaestro::checkConnection() short vpServoPololuMaestro::degSToSpeed(float speedDegS) { - return (speedDegS / 100) * (m_rangePWM / m_rangeAngle); + return static_cast((speedDegS / 100) * (m_rangePWM / m_rangeAngle)); } unsigned short vpServoPololuMaestro::getPosition()