This is the latest WPILib src, VisionSample2013, cRIO image, ... pulled down from firstforge.wpi.edu.

There might be risks in using the top of tree rather than an official release, but the commit messages do mention fixes for some deadlocks and race conditions.

git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4066 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/azaleasource/WPILibCProgramming/trunk/WPILib/Watchdog.h b/azaleasource/WPILibCProgramming/trunk/WPILib/Watchdog.h
new file mode 100644
index 0000000..22b5cab
--- /dev/null
+++ b/azaleasource/WPILibCProgramming/trunk/WPILib/Watchdog.h
@@ -0,0 +1,47 @@
+/*----------------------------------------------------------------------------*/

+/* Copyright (c) FIRST 2008. All Rights Reserved.							  */

+/* Open Source Software - may be modified and shared by FRC teams. The code   */

+/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */

+/*----------------------------------------------------------------------------*/

+

+#ifndef WATCHDOG_H

+#define WATCHDOG_H

+

+#include "ChipObject.h"

+#include "SensorBase.h"

+#include "Base.h"

+

+/**

+ * Watchdog timer class.

+ * The watchdog timer is designed to keep the robots safe. The idea is that the robot program must

+ * constantly "feed" the watchdog otherwise it will shut down all the motor outputs. That way if a

+ * program breaks, rather than having the robot continue to operate at the last known speed, the

+ * motors will be shut down.

+ * 

+ * This is serious business.  Don't just disable the watchdog.  You can't afford it!

+ * 

+ * http://thedailywtf.com/Articles/_0x2f__0x2f_TODO_0x3a__Uncomment_Later.aspx

+ */

+class Watchdog : public SensorBase

+{

+public:

+	static const double kDefaultWatchdogExpiration = 0.5;

+

+	Watchdog();

+	virtual ~Watchdog();

+	bool Feed();

+	void Kill();

+	double GetTimer();

+	double GetExpiration();

+	void SetExpiration(double expiration);

+	bool GetEnabled();

+	void SetEnabled(bool enabled);

+	bool IsAlive();

+	bool IsSystemActive();

+

+private:

+	tWatchdog *m_fpgaWatchDog;

+	DISALLOW_COPY_AND_ASSIGN(Watchdog);

+};

+

+#endif