Skip to content

Commit

Permalink
Fix warning detected on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Oct 23, 2023
1 parent fe37afa commit adad6a3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(((angle + abs(m_minAngle)) / m_rangeAngle) * m_rangePWM + m_minPWM);
}

bool vpServoPololuMaestro::checkConnection()
Expand All @@ -99,7 +99,7 @@ bool vpServoPololuMaestro::checkConnection()

short vpServoPololuMaestro::degSToSpeed(float speedDegS)
{
return (speedDegS / 100) * (m_rangePWM / m_rangeAngle);
return static_cast<short>((speedDegS / 100) * (m_rangePWM / m_rangeAngle));
}

unsigned short vpServoPololuMaestro::getPosition()
Expand Down

0 comments on commit adad6a3

Please sign in to comment.