Class MixedDrive
- java.lang.Object
-
- org.chsrobotics.lib.drive.differential.MixedDrive
-
- All Implemented Interfaces:
DifferentialDriveMode
public class MixedDrive extends java.lang.Object implements DifferentialDriveMode
DifferentialDriveMode composed of any number of DifferentialDriveModes, with configurable influences over the total value.
-
-
Constructor Summary
Constructors Constructor Description MixedDrive(java.util.Map<DifferentialDriveMode,java.lang.Double> driveModes)Constructs a MixedDrive.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DifferentialDrivetrainInputexecute()Calculate the drive output using the current joystick inputs.
-
-
-
Constructor Detail
-
MixedDrive
public MixedDrive(java.util.Map<DifferentialDriveMode,java.lang.Double> driveModes)
Constructs a MixedDrive.- Parameters:
driveModes- Map of drive modes to the influence they should carry in the total. Influences must add to 1.
-
-
Method Detail
-
execute
public DifferentialDrivetrainInput execute()
Calculate the drive output using the current joystick inputs.- Specified by:
executein interfaceDifferentialDriveMode- Returns:
- The input, mapped to left and right side inputs.
-
-