Wyatt
1.0.1
Main Page
Classes
Files
File List
include
commands
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);
26
~
DriveRobotCommand
();
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
};
Communicator
Definition:
Communicator.h:22
DriveRobotCommand::execute
bool execute() override
Definition:
DriveRobotCommand.cpp:34
DriveRobotCommand
Definition:
DriveRobotCommand.h:11
DriveRobotCommand::DriveRobotCommand
DriveRobotCommand(Communicator *comm, EncoderSensor *leftEncoder, EncoderSensor *rightEncoder, double radius, double rotationRate, int duration_ms, double wheelDiameter, double drivetrainDiameter)
Definition:
DriveRobotCommand.cpp:9
Command
Definition:
Command.h:6
EncoderSensor
Definition:
EncoderSensor.h:17
DriveRobotCommand::cleanup
bool cleanup(bool canceled) override
Definition:
DriveRobotCommand.cpp:59
Generated by
1.8.11