Go to Post We've done that autonomous. After several years of refinement we decided to skip the information collection and just drive into the wall at the earliest opportunity. - Greg Young [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 07-02-2017, 15:44
VaneRaklan VaneRaklan is offline
Registered User
FRC #2557 (The SOTABots)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Tacoma, WA
Posts: 19
VaneRaklan is an unknown quantity at this point
Re: Using a button to make controls flip

What language are you coding in? Cause that'll affect some things. Regardless the boolean toggle would be the way to go. The way that I coded our Gemini Drive (that's what I've been calling it) is by having the code look at both controllers constantly. For us, if Start and Select are active at the same time then the boolean changes to true thus running drive code altered for one direction and vice versa for the other controller.

So have two sets of drive code that change based on the state of a boolean, and tie thaat boolean to button combinations on the controllers or to some other button.

Here is the link to our code: https://github.com/FIRST-Team-2557-T...team2557/robot
The two files to look at would be ArcadeDrive_cmd and Chassis in the command and subsystem folders respectively. Just in case you'd like to see how we did it. Hope this helps!
Reply With Quote
 


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 19:49.

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