001    /*----------------------------------------------------------------------------*/
002    /* Copyright (c) FIRST 2008-2012. All Rights Reserved.                        */
003    /* Open Source Software - may be modified and shared by FRC teams. The code   */
004    /* must be accompanied by the FIRST BSD license file in the root directory of */
005    /* the project.                                                               */
006    /*----------------------------------------------------------------------------*/
007    
008    package edu.wpi.first.wpilibj;
009    
010    /**
011     * Interface for speed controlling devices.
012     */
013    public interface SpeedController extends PIDOutput {
014    
015        /**
016         * Common interface for getting the current set speed of a speed controller.
017         *
018         * @return The current set speed.  Value is between -1.0 and 1.0.
019         */
020        double get();
021    
022        /**
023         * Common interface for setting the speed of a speed controller.
024         *
025         * @param speed The speed to set.  Value should be between -1.0 and 1.0.
026         * @param syncGroup The update group to add this Set() to, pending UpdateSyncGroup().  If 0, update immediately.
027         */
028        void set(double speed, byte syncGroup);
029    
030        /**
031         * Common interface for setting the speed of a speed controller.
032         *
033         * @param speed The speed to set.  Value should be between -1.0 and 1.0.
034         */
035        void set(double speed);
036    
037        /**
038         * Disable the speed controller
039         */
040        void disable();
041    }