Go to Post Actually there are several Wayne Cokeleys circulating around. We cloned him in 2001. This is his evil twin Mordechai responding.....-WC 3 - Wayne C. [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 15-01-2017, 00:07
trycatch's Avatar
trycatch trycatch is offline
Registered User
FRC #5858
 
Join Date: Nov 2015
Rookie Year: 2015
Location: AL
Posts: 39
trycatch is on a distinguished road
Command-Based robot + OI + joystick axis?

Hey all. This is my first year trying to transfer over to Command Based, and I think I've got most of it figured out. I've got a few JoystickButtons with whenPressed commands in the OI, but I'm a bit fuzzy on how to handle the actual joystick x, y, and twist. Is there an on-pressed equivalent, or should I just get the x, y and twist every teleopPeriodic and add a new Drive() to the scheduler?

Thanks all!
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2017, 00:09
WSiggs WSiggs is offline
Pb Programmer
FRC #4908 (Dragons)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Duxbury Massachusetts
Posts: 37
WSiggs is on a distinguished road
Re: Command-Based robot + OI + joystick axis?

Quote:
Originally Posted by trycatch View Post
Hey all. This is my first year trying to transfer over to Command Based, and I think I've got most of it figured out. I've got a few JoystickButtons with whenPressed commands in the OI, but I'm a bit fuzzy on how to handle the actual joystick x, y, and twist. Is there an on-pressed equivalent, or should I just get the x, y and twist every teleopPeriodic and add a new Drive() to the scheduler?

Thanks all!
You shouldn't need to change anything in teleopPeriodic, the easiest way is to just set a default command for your drive subsystem, and then in the execute method of the command set the drive motors to the value from the joysticks.

Last edited by WSiggs : 15-01-2017 at 00:12.
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 23:52.

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