# MovementAPI

Package org.firstinspires.ftc.teamcode

## Class MovementAPI

- java.lang.Object
- - org.firstinspires.ftc.teamcode.MovementAPI

    public class MovementAPI
    extends java.lang.Object

### Constructor Summary

Constructors
`MovementAPI​(API api, API.Motor _fl, API.Motor _fr, API.Motor _bl, API.Motor _br)` Initializes the API
`MovementAPI​(API api, GameMotors motors)` Initializes the API with the motors in the GameMotor enum

### Method Summary

All Methods Instance Methods Concrete Methods
`API.Motor` `getBL()`
`API.Motor` `getBR()`
`API.Motor` `getFL()`
`API.Motor` `getFR()`
`void` `move​(double direction, double speed)` Moves the robot in a given direction with a given speed
`void` `move​(double direction, double speed, boolean verbose)` Moves the robot in a given direction with a given speed
`void` `move​(double powerY, double powerX, double turn, double speed)` Moves the robot given the speed to move forward/back and left/right
`void` `move​(double powerY, double powerX, double turn, double speed, boolean verbose)` Moves the robot given the speed to move forward/back and left/right
`void` `setFlipped​(boolean flipped)`
`void` `stop()` Stops the robot

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MovementAPI

    public MovementAPI​(API api,
                       API.Motor _fl,
                       API.Motor _fr,
                       API.Motor _bl,
                       API.Motor _br)

Initializes the API

Parameters:
  `_fl` - the front-left wheel
  `_fr` - the front-right wheel
  `_bl` - the back-left wheel
  `_br` - the back-right wheel

#### MovementAPI

    public MovementAPI​(API api,
                       GameMotors motors)

Initializes the API with the motors in the GameMotor enum

### Method Detail

#### getFL

    public API.Motor getFL()

#### getFR

    public API.Motor getFR()

#### getBL

    public API.Motor getBL()

#### getBR

    public API.Motor getBR()

#### setFlipped

    public void setFlipped​(boolean flipped)

#### move

    public void move​(double powerY,
                     double powerX,
                     double turn,
                     double speed,
                     boolean verbose)

Moves the robot given the speed to move forward/back and left/right

Parameters:
  `powerY` - the speed to move forward/back, -1 to 1, positive being forward
  `powerX` - the speed to move left/right, -1 to 1, positive being to the right
  `turn` - the speed to turn at, -1 to 1, positive being clockwise
  `speed` - a multiplier on the final speed
  `verbose` - whether or not to log extra data to telemetry

#### move

    public void move​(double powerY,
                     double powerX,
                     double turn,
                     double speed)

Moves the robot given the speed to move forward/back and left/right

Parameters:
  `powerY` - the speed to move forward/back, -1 to 1, positive being forward
  `powerX` - the speed to move left/right, -1 to 1, positive being to the right
  `turn` - the speed to turn at, -1 to 1, positive being clockwise
  `speed` - a multiplier on the final speed

#### move

    public void move​(double direction,
                     double speed,
                     boolean verbose)

Moves the robot in a given direction with a given speed

Parameters:
  `direction` - the direction to move in, in degrees, with positive being left of forward
  `speed` - the speed to move at
  `verbose` - whether or not to log extra data to telemetry

#### move

    public void move​(double direction,
                     double speed)

Moves the robot in a given direction with a given speed

Parameters:
  `direction` - the direction to move in, in degrees, with positive being left of forward
  `speed` - the speed to move at

#### stop

    public void stop()

Stops the robot