Go to Post Some people use Autodesk, some SolidWorks, some Pro-E, but 772 rose to the call of an unconventional CAD language, Minecraft. - Walter Deitzler [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 13-03-2013, 21:27
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: SmartDashboard with CommandBasedRobot Template

Quote:
Originally Posted by Jefferson View Post
I have not been able to get commands to run in disabled. If you are able to, I'd like to know how.
In Java, there is a setRunWhileDisabled method, that you can call in the constructor of the command. You also need to call the scheduler in the disabledPeriodic. I assume it's similar in C++.
Reply With Quote
  #2   Spotlight this post!  
Unread 13-03-2013, 21:40
Jefferson Jefferson is offline
Registered User
AKA: Jeff Clements
FRC #0016 (Bomb Squad)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Mountain Home, AR
Posts: 257
Jefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant future
Re: SmartDashboard with CommandBasedRobot Template

Quote:
Originally Posted by Joe Ross View Post
In Java, there is a setRunWhileDisabled method, that you can call in the constructor of the command. You also need to call the scheduler in the disabledPeriodic. I assume it's similar in C++.
Ah. Probably. I was running the scheduler, but didnt know about the setRunWhileDisabled option. I'll check it out tonight.

Thanks
Reply With Quote
  #3   Spotlight this post!  
Unread 13-03-2013, 21:42
CardcaptorRLH85's Avatar
CardcaptorRLH85 CardcaptorRLH85 is offline
The master of the cards ^_^
AKA: Raa'Shaun H.
FRC #0322 (F.I.R.E. "Flint Inspires Real Engineers")
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Michigan, USA
Posts: 59
CardcaptorRLH85 is an unknown quantity at this point
Send a message via ICQ to CardcaptorRLH85 Send a message via AIM to CardcaptorRLH85 Send a message via MSN to CardcaptorRLH85 Send a message via Yahoo to CardcaptorRLH85
Re: SmartDashboard with CommandBasedRobot Template

Quote:
Originally Posted by Jefferson View Post
I have not been able to get commands to run in disabled. If you are able to, I'd like to know how.
Quote:
Originally Posted by Joe Ross View Post
In Java, there is a setRunWhileDisabled method, that you can call in the constructor of the command. You also need to call the scheduler in the disabledPeriodic. I assume it's similar in C++.
Yup, in C++ it works like this:

Code:
	virtual void RobotInit() {
		CommandBase::init();
		lw = LiveWindow::GetInstance();
		
                RandomCommand->SetRunWhenDisabled(true);
	}
        .
        .
        .
	virtual void DisabledPeriodic() {
		RandomCommand->Run();
		Scheduler::GetInstance()->Run();
	}
__________________

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 12:50.

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