View Single Post
  #2   Spotlight this post!  
Unread 30-03-2015, 10:20
GeeTwo's Avatar
GeeTwo GeeTwo is online now
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,614
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Only One side of the "mock elevator" is working

I'm trying to figure out what you're doing here.

Do you have two separate sides of the elevator which run in opposite directions to lift, controlled by jaguars? If so, it would probably make more sense to have the Elevator2 "constant" equal -1, then when you set the speeds, the code inside the loop is either both positive or both negative.

Also, what is the function of the relays in your setup? Should you set them to some value when stopped?

Finally, just to verify that you are only declaring/assigning objects to E1 and E2 once in initialization, not once per loop? Re-declaring controller and sensor objects repeatedly can cause them to work inconsistently as they cycle through shutdown and startup. Re-declaring the floats would be a waste of CPU cycles, but is less likely to be noticeable in terms of performance.

Oh, also to verify -- java, right?
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 30-03-2015 at 10:22.