Skip to main content Link Menu Expand (external link) Document Search Copy Copied

DriveController(Chassis* chassis, std::function<double(double)> speedCurve)

Constructs a DriveController with the given chassis and speed curve.

Parameters

  • chassis - The chassis to drive the motors on
  • speedCurve - The function to curve the controller with.

Example

//use a linear speed curve
DriveController dc = DriveController(&chassis, [](double v){ return v; });