24 lines
509 B
C++
24 lines
509 B
C++
#pragma once
|
|
|
|
#include "Thing.h"
|
|
|
|
namespace RoboidControl {
|
|
|
|
class Motor : public Thing {
|
|
public:
|
|
Motor(Participant* owner);
|
|
// Motor(Thing* parent);
|
|
Motor(Thing& parent = Thing::Root);
|
|
|
|
/// @brief Motor turning direction
|
|
enum class Direction { Clockwise = 1, CounterClockwise = -1 };
|
|
/// @brief The forward turning direction of the motor
|
|
Direction direction;
|
|
|
|
virtual void SetTargetSpeed(float targetSpeed); // -1..0..1
|
|
|
|
protected:
|
|
float targetSpeed = 0;
|
|
};
|
|
|
|
} // namespace RoboidControl
|