Thread: Coding
View Single Post
  #3   Spotlight this post!  
Unread 17-03-2014, 14:12
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Coding

Your teleop shooter is wrong, it should be like this

if(condition1)
shooter.set(speed)
else if(condition2)
shooter.set(otherspeed)
else
shooter.set(0)
endif

the way you have it up is

if(condition1)
shooter.set(speed)
else
shooter.set(0)
endif

if(condition2)
shooter.set(other)
else
shooter.set(0)
endif

If conditon1 is met, it will still be 0 because the second time around, its setting it to 0

Last edited by Arhowk : 17-03-2014 at 14:14.
Reply With Quote