|
Re: Spike relay help
Also,
what is the purpose for Timer.delay?
Unless you are running a multi-threaded robot, you should remove this line of code. This code halts your entire robot for that amount of time.
Generally speaking, you should never use a delay function on a robot, unless you are doing it purposefully, understand exactly what is being delayed, and are running a multi-threaded robot.
This line, Timer.delay(0.1) will halt your entire robot (unless it is in a separate thread from Robot Main) for 1/10th of a second. The control loop of the robot, expects to run once every 50ms, this line of code is preventing your robot from doing so, and it can/will lead to watchdog errors or communication problems, especially if you use larger delays else where in code.
Regards,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
|