![]() |
addSequential NOT Working for Servos
I have two programs to run a servo - if I assign the programs individually to buttons they work but if I build a command group with those two commands in it - so they go one after another - nothing happens - I assigned this command group to a button and it doesn't work - nothing happens when I assign the group as the autonomous command either.
Here it is: Code:
addSequential(new Move45()); |
Re: addSequential NOT Working for Servos
what do the commands look like? I'm guessing you're sending the servo one command to go to 45 degrees (for ~20ms) then immediately telling it to go back to 0.
|
Re: addSequential NOT Working for Servos
you might want to add :
Code:
addSequential(new Move45()); |
Re: addSequential NOT Working for Servos
Here are the commands:
Code:
package edu.wpi.first.LFRobot2014.commands;Code:
package edu.wpi.first.LFRobot2014.commands; |
Re: addSequential NOT Working for Servos
A delay should fix your problem. While you are using what seems like a logical isFinished condition the reality is that it won't work. A servo provides no feedback to the rest of the system. A servo takes time to move from point A to point B. calling setPos(45) and then calling getPos() will yield 45. getPos() only tells you where the servo was last set. It doesn't take into account where the servo actually is.
Kyle |
| All times are GMT -5. The time now is 11:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi