Wyatt  1.0.1
DriveRobotCommand.h
1 //
2 // Created by Tucker Haydon on 4/28/17.
3 //
4 
5 #pragma once
6 #include "Command.h"
7 #include "../../include/commands/DriveMotorRPM.h"
8 #include <sys/time.h>
9 #include <math.h>
10 
11 class DriveRobotCommand:public Command {
12 
13 public:
25  DriveRobotCommand(Communicator* comm, EncoderSensor* leftEncoder, EncoderSensor* rightEncoder, double radius, double rotationRate, int duration_ms, double wheelDiameter, double drivetrainDiameter);
27 
32  bool execute() override;
33 
39  bool cleanup(bool canceled) override;
40 
41 private:
42  int duration_ms;
43  long long endTime = -1;
44  Command* leftMotorCommand;
45  Command* rightMotorCommand;
46 
47 
48 };
bool execute() override
DriveRobotCommand(Communicator *comm, EncoderSensor *leftEncoder, EncoderSensor *rightEncoder, double radius, double rotationRate, int duration_ms, double wheelDiameter, double drivetrainDiameter)
Definition: Command.h:6
bool cleanup(bool canceled) override