Add GetTargetSpeed

This commit is contained in:
Pascal Serrarens 2024-01-19 14:13:37 +01:00
parent d5daab436e
commit 8b2f9439ca
2 changed files with 7 additions and 0 deletions

View File

@ -10,4 +10,6 @@ void Motor::SetTargetSpeed(float targetSpeed) {
this->currentTargetSpeed = targetSpeed;
}
float Motor::GetTargetSpeed() { return (this->currentTargetSpeed); }
void Motor::Update(float currentTimeMs) {}

View File

@ -26,6 +26,11 @@ public:
/// @brief Get the current target speed of the motor
/// @return The speed between -1 (full backward), 0 (stop) and 1 (full
/// forward)
virtual float GetTargetSpeed();
/// @brief Get the current actual speed of the motor
/// @return The speed between -1 (full backward), 0 (stop) and 1 (full
/// forward)
virtual float GetActualSpeed();
virtual void Update(float currentTimeMs);