Roboid Control for C++ 0.4
Loading...
Searching...
No Matches
Motor.h
1#pragma once
2
3#include "Thing.h"
4
5namespace RoboidControl {
6
7class Motor : public Thing {
8 public:
9 Motor(Thing* parent = Thing::LocalRoot());
10
12 enum class Direction { Clockwise = 1, CounterClockwise = -1 };
14 Direction direction;
15
16 virtual void SetTargetVelocity(float velocity); // -1..0..1
17 virtual float GetTargetVelocity();
18
19 int GenerateBinary(char* bytes, unsigned char* ix) override;
20
21 protected:
22 float targetVelocity = 0;
23};
24
25} // namespace RoboidControl
static Thing * LocalRoot()
The root thing for the local participant.
Definition Thing.cpp:23