![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
A drivetrain with a left and a right side, each driven as one motor (usually a MotorGroup). More...
#include <SkidSteerChassis.hpp>
Classes | |
| struct | WheelVoltages |
| One tick's command: a voltage for each side. Positive drives forward. More... | |
| class | Lease |
| The exclusive right to drive the chassis, held by whatever is driving it right now. More... | |
Public Member Functions | |
| SkidSteerChassis (Motor &left, Motor &right) | |
| SkidSteerChassis (const SkidSteerChassis &)=delete | |
| SkidSteerChassis & | operator= (const SkidSteerChassis &)=delete |
| Lease | take () |
| Takes the exclusive right to drive. | |
A drivetrain with a left and a right side, each driven as one motor (usually a MotorGroup).
Motions take the chassis as an argument and drive it through a Lease:
Task<> creep(SkidSteerChassis& chassis) {
SkidSteerChassis::Lease drive = chassis.take();
for (;;) {
drive.apply({.left = au::volts(3.0), .right = au::volts(3.0)}); // write first, then wait
co_await estimatorsUpdated();
}
}
|
delete |
|
delete |
|
nodiscard |
Takes the exclusive right to drive.
| std::logic_error | if something else is driving it: two motions at once is a bug. |