View Single Post
  #3   Spotlight this post!  
Unread 17-01-2015, 13:05
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: RobotPy doesn't PWM?

Quote:
Originally Posted by RufflesRidge View Post
I don't know Python, but I can tell you what the issue is based on WPILib. The code you have posted will construct two speed controllers, set their outputs to .125, construct a Robot Drive out of those speed controllers, then in Teleop set their outputs based on the joystick value.

Reading the above,you may notice that setting their outputs to .125 there doesn't really accomplish much.

If you want to scale your joystick values, you need to get the joystick values (using getX and getY) scale them, then pass them into an alternate version of the ArcadeDrive method that takes doubles as parameters.
So I exchanged the old arcadedrive for "self.robot_drive.arcadeDrive(self.stick.getX(),se lf.stick.getY())" but it still doesn't slow down.