RoboidControl
Loading...
Searching...
No Matches
d:/PlatformIO/RoboidControl/Motor.h
Go to the documentation of this file.
1#pragma once
2
3#include "Thing.h"
4
5#include <time.h>
6
7namespace Passer {
8namespace RoboidControl {
9
12class Motor : public Thing {
13public:
15 Motor();
16
18 enum class Direction { Clockwise = 1, CounterClockwise = -1 };
21
25 virtual void SetTargetSpeed(float speed);
29 virtual float GetTargetSpeed();
30
34 virtual float GetActualSpeed();
35
36 virtual void Update(float currentTimeMs);
37
39
40protected:
41};
42
43} // namespace RoboidControl
44} // namespace Passer
45using namespace Passer::RoboidControl;
A Motor is a Thing which can move parts of the Roboid.
Definition Motor.h:12
virtual float GetTargetSpeed()
Get the current target speed of the motor.
Definition Motor.cpp:13
virtual void SetTargetSpeed(float speed)
Set the target motor speed.
Definition Motor.cpp:9
Direction
Motor turning direction.
Definition Motor.h:18
virtual float GetActualSpeed()
Get the current actual speed of the motor.
Definition Motor.cpp:7
virtual void Update(float currentTimeMs)
Definition Motor.cpp:15
float currentTargetSpeed
Definition Motor.h:38
Direction direction
The forward turning direction of the motor.
Definition Motor.h:20
Motor()
Default constructor for the Motor.
Definition Motor.cpp:5
A thing is a functional component on a robot.
Definition Thing.h:9
Definition Accelerometer.h:7
Definition AbsoluteEncoder.h:5