LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
subsystems.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "LightLib/lib.hpp"
5#include "pros/motors.hpp"
6
20extern Drive chassis;
21
38inline pros::Motor Top(7);
39inline pros::Motor Bottom(17);
40inline pros::MotorGroup Score({17, 7});
41
42inline pros::Motor turret(0);
43inline pros::Optical optical(15);
58inline pros::Motor LiftMotor(0);
59inline pros::Rotation LiftRot(0);
60
64 /* snap_angles_deg = */ {0.0, 45.0, 90.0, 135.0, 180.0},
65 /* kP = */ 1.5,
66 /* tolerance_deg = */ 1.0,
67 /* max_snap_speed = */ 80);
80inline light::Piston Wings('A');
81inline light::Piston Loader('C');
83inline light::Piston Hood('E');
96enum Colors { BLUE = 0,
98 RED = 2 };
99extern Colors allianceColor;
Tank-drive chassis class.
Definition drive.hpp:72
Stateful 3-wire pneumatic piston with toggle helpers.
Definition piston.hpp:26
Manual-then-snap controller for a motor + rotation-sensor pair.
Umbrella header for LightLib's own classes.
Manual-then-snap mechanism controller.
Drive chassis
The drive chassis, configured in main.cpp and used everywhere else.
pros::MotorGroup Score({17, 7})
Top + Bottom together.
pros::Rotation LiftRot(0)
Rotation sensor on the lift axis.
Colors
Alliance color enum used by the color-sort logic.
@ BLUE
@ NEUTRAL
@ RED
light::RotationalSnap Lift(LiftMotor, LiftRot, {0.0, 45.0, 90.0, 135.0, 180.0}, 1.5, 1.0, 80)
Lift assembly: snaps to {0, 45, 90, 135, 180}° at rest.
pros::Motor LiftMotor(0)
0 = disabled until you set the port.
Colors allianceColor
Currently active alliance color.
light::Piston Hood('E')
Scoring hood.
pros::Motor Bottom(17)
pros::Motor Top(7)
light::Piston MidGoal('D')
Mid-goal clamp or mechanism.
pros::Motor turret(0)
Set port to 0 if not installed.
pros::Optical optical(15)
Optical sensor for color sorting.
light::Piston Loader('C')
Ball loader / indexer.
light::Piston Wings('A')
Intake wings / expander.