View Single Post
  #2   Spotlight this post!  
Unread 17-02-2014, 13:03
Jay Meldrum's Avatar
Jay Meldrum Jay Meldrum is offline
Registered User
FRC #0067 (H.O.T.)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2003
Location: Michigan
Posts: 42
Jay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud of
Re: Is a watchdog necessary?

Although it is good programming practice, you do not need to use the watchdog.

You can easily turn it off by setting the SetSafetyEnabled in your RobotDrive object to false.

This applies to both auton and teleop.

Code:
#include "WPILib.h"

class BuiltinDefaultCode : public IterativeRobot
{
private:
	//Declare drive motors
	Talon* m_lDrive; 
	Talon* m_rDrive;
        RobotDrive* m_robotDrive;

public:


	BuiltinDefaultCode()	{
		//Initialze drive controllers
		m_lDrive = new Talon (1);
		m_rDrive = new Talon (2);

		//Initialize robot drive
		m_robotDrive = new RobotDrive (m_lDrive, m_rDrive);
		m_robotDrive->SetSafetyEnabled(false);
....
__________________
2012-2015 - FRC 67 - Programming/Controls Lead Mentor
2003-2005 - FRC 857 - Driver

Check us out at http://www.hotteam67.org
Previous year design docs, programming tutorials, and more!

Last edited by Jay Meldrum : 17-02-2014 at 13:05.
Reply With Quote