24 lines
512 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 SetTargetVelocity(float velocity); // -1..0..1
protected:
float targetVelocity = 0;
};
} // namespace RoboidControl