001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package org.wpilib.romi;
006
007import org.wpilib.hardware.motor.PWMMotorController;
008
009/**
010 * RomiMotor.
011 *
012 * <p>A general use PWM motor controller representing the motors on a Romi robot
013 */
014public class RomiMotor extends PWMMotorController {
015  /** Common initialization code called by all constructors. */
016  protected final void initRomiMotor() {
017    m_pwm.setOutputPeriod(5);
018    setThrottle(0.0);
019  }
020
021  /**
022   * Constructor.
023   *
024   * @param channel The PWM channel that the RomiMotor is attached to. 0 is the left motor, 1 is the
025   *     right.
026   */
027  @SuppressWarnings("this-escape")
028  public RomiMotor(final int channel) {
029    super("Romi Motor", channel);
030    initRomiMotor();
031  }
032}