LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
autons.hpp File Reference

Autonomous routine declarations. More...

Go to the source code of this file.

Functions

Setup functions

Called once by initialize() in main.

Do not rename these.

void default_constants ()
 Tune PID gains, exit conditions, and slew rates.
 
void default_positions ()
 Set starting piston / mechanism states.
 
Autonomous routines

Competition autonomous entry points.

void run_jerryio_path_1 ()
 Run the path generated by the JerryIO path planner (path 1).
 
Test / tuning routines

Useful during practice for dialing in PID.

Register these in auton_config.cpp during tuning sessions; remove them before competition.

void con_test ()
 Basic connectivity / control check.
 
void drive_test (int inches)
 Drive straight N inches — tune drive PID.
 
void turn_test (int degrees)
 Turn to N degrees — tune turn PID.
 
void swing_test (int degrees)
 Swing to N degrees — tune swing PID.
 
void heading_test (int degrees)
 Drive while fighting a heading offset.
 
void odom_test (int degrees)
 Zero odom then drive 24 in — test odometry.
 

Detailed Description

Autonomous routine declarations.

Three files work together to set up autonomous:

  • autons.hpp — declare every auton function (this file)
  • autons.cpp — write the actual autonomous code
  • auton_config.cpp — register each auton with the brain-screen picker

Workflow for adding a new routine:

  1. Declare it here: void my_auton();
  2. Write it in autons.cpp
  3. Register it in auton_config.cpp: light::auton_selector.add("Label", "na", my_auton);

Definition in file autons.hpp.

Function Documentation

◆ con_test()

void con_test ( )

Basic connectivity / control check.

◆ default_constants()

void default_constants ( )

Tune PID gains, exit conditions, and slew rates.

◆ default_positions()

void default_positions ( )

Set starting piston / mechanism states.

◆ drive_test()

void drive_test ( int  inches)

Drive straight N inches — tune drive PID.

◆ heading_test()

void heading_test ( int  degrees)

Drive while fighting a heading offset.

◆ odom_test()

void odom_test ( int  degrees)

Zero odom then drive 24 in — test odometry.

◆ run_jerryio_path_1()

void run_jerryio_path_1 ( )

Run the path generated by the JerryIO path planner (path 1).

◆ swing_test()

void swing_test ( int  degrees)

Swing to N degrees — tune swing PID.

◆ turn_test()

void turn_test ( int  degrees)

Turn to N degrees — tune turn PID.