withPhoton

fun withPhoton(swerveDrive: SwerveDrive, photonModule: PhotonModule, translationSpeed: () -> Double = { 0.0 }, strafeSpeed: () -> Double = { 0.0 }): AlignToTarget

Creates an AlignToTarget command using a PhotonVision camera.

Return

AlignToTarget command configured for PhotonVision.

Parameters

swerveDrive

The swerve drive subsystem.

photonModule

The PhotonVision module.

translationSpeed

Supplier for forward/backward speed.

strafeSpeed

Supplier for left/right speed.