21 lines
		
	
	
		
			397 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			397 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include "Thing.h"
 | |
| 
 | |
| class Motor : public Thing {
 | |
|  public:
 | |
|   Motor();
 | |
|   /// @brief Turning direction of the motor
 | |
|   enum Direction { Forward = 1,
 | |
|                    Reverse = -1 };
 | |
| 
 | |
|   /// @brief Set the turning direction of the motor
 | |
|   // void SetDirection(Direction direction);
 | |
| 
 | |
|   virtual void SetSpeed(float speed) = 0;
 | |
|   float GetSpeed();
 | |
| 
 | |
|  protected:
 | |
|   float currentSpeed = 0;
 | |
| };
 | 
