View Single Post
  #7   Spotlight this post!  
Unread 20-02-2014, 07:25
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous starving teleop?

I looked through the charts, and the CPU is almost always pegged. During Teleop and during Disabled. That means that expensive code is probably in Periodic. That doesn't really make sense with the code I'm looking at. You only attached the dsLog file and not the dsEvent file, so what I don't know is how many errors were being thrown.

I don't have a cRIO at home, but luckily, your project uses simulation. I ran your code and I'm seeing that your periodic code is failing to open a solenoid and Motor refnum, but is then setting those anyway, and possibly at a pretty fast speed. Those sets are obviously failing, which would cause your robot to not operate properly, but even worse, the errors bog down the CPU so that your teleOp code has issues.

I think you will be able to find the issues pretty easily. It is most likely that the names in Begin and Periodic no longer match, or it is possible that some of the I/O was closed somewhere in the program. It may be easiest to open Periodic and set it to highlight. Turn on the light bulb at that top of the window. This slows it way down, and then you can see immediately when the error is sent to the DS Diagnostic tab.

Boa Sorte.
And if you fail to find the issues, let me know and I can help identify which of the refnums are causing problems.

Greg McKaskle