Announcement

Collapse
No announcement yet.

Really Quick question about AfterGlow controller rumble

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Really Quick question about AfterGlow controller rumble

    SOLVED


    Does anyone know how it works? Here is my code so far.

    #include "WPILib.h"
    #include "ctre/Phoenix.h"
    #include <iostream>


    using namespace frc;



    class Robot: public IterativeRobot {
    public:

    Robot() {}
    Joystick *joystick;
    void RobotInit() {
    joystick = new Joystick(0);


    }

    void DisabledInit() { }
    void AutonomousInit() { }
    void TeleopInit() {
    }
    void TestInit() { }


    void DisabledPeriodic() { }
    void AutonomousPeriodic() { }
    void TeleopPeriodic() {
    enum RumbleType {kLeftRumble =0 , kRightRumble=1};
    joystick->SetRumble(RumbleType kRightRumble, 1);


    }
    void TestPeriodic() { }
    };

    START_ROBOT_CLASS(Robot)





    THE ERROR that it gives is expected primary expression before kRightRumble. Does anyone know how SetRumble works? Thanks!
    Last edited by RobotRobot; 10-30-2018, 10:39 PM.

  • #2
    Take a look at this example of how to use a rumbler in a gamepad.

    https://github.com/wpilibsuite/allwp.../cpp/Robot.cpp

    Comment


    • #3
      Thank you! It worked!

      Comment

      Working...
      X