File management and Completed Part 1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#ifndef MOTOR_DRIVER_H
|
||||
#define MOTOR_DRIVER_H
|
||||
|
||||
class Motor_driver
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
|
||||
// Range: -255 ... +255
|
||||
void set_command(double command);
|
||||
|
||||
void coast();
|
||||
|
||||
void brake();
|
||||
|
||||
double command() const;
|
||||
|
||||
private:
|
||||
double currentCommand;
|
||||
|
||||
void enable_pwm_outputs();
|
||||
|
||||
unsigned char magnitude(double value) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user