Go to Post As a team sponsor, we are more concerned with the behavior, attitude and commitment to FIRST ideals than specific performance in the competition. Some of our teams perform well, some struggle, some are in the middle. We support them all in every way we can. - Chris Fultz [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2014, 12:44
mr_abomination mr_abomination is offline
Registered User
FRC #4733
 
Join Date: Feb 2014
Rookie Year: 2012
Location: Canada
Posts: 9
mr_abomination is an unknown quantity at this point
Is a watchdog necessary?

We are arguing about whether or not we need a watchdog for our autonomous code.

If we do need one can we stick it out of the way in a separate class watching itself?

Last edited by mr_abomination : 14-02-2014 at 12:58.
Reply With Quote
  #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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:09.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi