ART v1.0-alpha
A Robot Template that raises the floor for VRC teams
Loading...
Searching...
No Matches
SimpleMotorGroup.h
Go to the documentation of this file.
1
15#pragma once
16
17#include "vex.h"
18
19namespace art
20{
21
36 class SimpleMotorGroup : public vex::motor_group
37 {
38 public:
55 SimpleMotorGroup(vex::motor_group mot);
56
102 SimpleMotorGroup &withSpeedMode(bool speedMode);
103
121 void setSpeedMode(bool speedMode);
122
132 bool getSpeedMode();
133
161 void set(double cmd);
162
176 double get();
177
178 private:
192 double m_cmd{0};
193
208 bool m_speedMode{false};
209 };
210
211} // namespace ART
A Simple Motor_Group Wrapper Class.
void set(double cmd)
Sets the motor to spin at the specified command.
SimpleMotorGroup(vex::motor_group mot)
Construct a new Simple Motor_Group object.
double m_cmd
The command the motor-group is set to, as a percentage of the max.
bool m_speedMode
Whether or not the motor-group should use speed, rather than voltage.
SimpleMotorGroup & withSpeedMode(bool speedMode)
Returns a SimpleMotorGroup refrence with the specified speedMode.
bool getSpeedMode()
Get the SpeedMode of the SimpleMotorGroup.
void setSpeedMode(bool speedMode)
Set the SpeedMode of the SimpleMotorGroup.
double get()
Returns the command the motor-group was last commanded to.
Definition PID.h:20
The include file for the Vex Library.