View Single Post
  #11   Spotlight this post!  
Unread 20-01-2010, 15:40
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Dashboard-Driver Station Help Please

Quote:
Originally Posted by heydowns View Post
The vision example is obviously broken with respect to the Watchdog usage. It clearly enables the watchdog, sets expiration to some time (let's say t seconds, since I don't have it in front of me) and then proceeds to sleep significantly longer than that expiration (t + x).
You will always get a watchdog not fed at the start of this example if left unmodified.

I do understand your frustration with the quality of the examples.
But it still feeds it
Quote:
Originally Posted by 2010ImageDemo
...
// set watchdog
GetWatchdog().SetExpiration(1.0);

Wait(3.0);


// keep track of the previous joystick trigger value
bool lastTrigger = false;

// loop getting images from the camera and finding targets
printf("Starting operator control loop\n");
while (IsOperatorControl()) {
bool trigger;
GetWatchdog().Feed();
...
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote