team2517 / 2013_code

Robotics code and documentation for the 2013 season
0 stars 2 forks source link

Lifter Arm Step Code #4

Open cosmiccricket opened 11 years ago

cosmiccricket commented 11 years ago

https://github.com/team2517/2013_code/blob/master/2013robot.cpp#L316

Is this legit?

https://github.com/team2517/2013_code/blob/master/2013robot.cpp#L392

Should this be 1 instead of 0?

admalledd commented 11 years ago

I am not 100% sure, I think we need to ask @gint271 about that. I think it should be ok, because it will force the case-statement to fall through to the default case, meaning it resets back to normal, but what is the intent of that button normally? (comment more what a thing is meant to be doing dude...)

cosmiccricket commented 11 years ago

The intent of that button is to make the arm stop whatever it's doing and go back to its default position.

admalledd commented 11 years ago

ok, now i see. here is what that should look like then:

This should do it if I am understanding correctly, but double check it first:


if (joystick.GetRawButton(7)) {
    lifterStep = 0;
    timer.Reset();
    timer.Start();
    lifterStart = true;
}

Also, I think that step 9 and 10 might be combined, but that might require testing...