Go to Post Physics is not a religion. - Jack Jones [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 17-01-2015, 16:21
nathanzentner08 nathanzentner08 is offline
Registered User
FRC #2073
 
Join Date: Jan 2015
Location: Sacramento
Posts: 6
nathanzentner08 is an unknown quantity at this point
Command Based Programming

Im assuming that the command based programming is more even based programming. Create a command, associate it to a JoystickButton and when the button is clicked, the command is run.

I have put printlns in all methods, and am clicking the joystickbutton but nothing is printing.

I have even ran the start on the command, but it is not getting into the execute, or initialize for that matter.

I have also added it to a group and started the group, but nothing.

Ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 17-01-2015, 17:44
AlexBrinister AlexBrinister is offline
Registered User
AKA: Alex Brinister
FRC #1768 (RoboChiefs)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Bolton, MA
Posts: 93
AlexBrinister will become famous soon enough
Re: Command Based Programming

Could you post your code?

Alex Brinister
Reply With Quote
  #3   Spotlight this post!  
Unread 17-01-2015, 17:56
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Command Based Programming

If you wrote the code by hand (rather than RobotBuilder generated) make sure that you are calling Scheduler.run() in the TeleopPeriodic method like this:
Code:
    public void teleopPeriodic() {
        Scheduler.getInstance().run();
    }
That's what actually causes the commands to run each iteration.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #4   Spotlight this post!  
Unread 17-01-2015, 19:02
BLUEBELL BLUEBELL is offline
Registered User
FRC #3773
 
Join Date: Mar 2014
Location: Tecumseh
Posts: 15
BLUEBELL is an unknown quantity at this point
Re: Command Based Programming

Would I need to do that with the iterative robot code?
Reply With Quote
  #5   Spotlight this post!  
Unread 17-01-2015, 19:03
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Command Based Programming

stick to command based its much easier to manage.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-01-2015, 19:08
BLUEBELL BLUEBELL is offline
Registered User
FRC #3773
 
Join Date: Mar 2014
Location: Tecumseh
Posts: 15
BLUEBELL is an unknown quantity at this point
Re: Command Based Programming

But if I was going to use iterative would I need the
Code:
Scheduler.getInstance().run();
Reply With Quote
  #7   Spotlight this post!  
Unread 17-01-2015, 19:12
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Command Based Programming

Command based programming is based off of iterative. Instead of putting your code in the xxxPeriodic() methods, you call "Scheduler.getInstance().run();" in them and put your code in commands.

Look at the command based example to see how this is supposed to be done.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
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 10:37.

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