Go to Post just watch out for the evil, robot devouring ghosts - Mr. Pockets [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   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
  #2   Spotlight this post!  
Unread 07-02-2017, 15:54
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
Founder and CEO, DeadMemes Studios
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 419
Poseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud of
Re: Using a button to make controls flip

I assume that the reason you want to know this is so that you can drive easier when you are turned around. Alternatively, you could use WPI's built in field-oriented mecanum functionality, so that forward is always down the field, down is towards you, left is your left, etc. relative to the driver, not the robot.
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division
2017 - Team 5817: Return of the bench grinder


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:23.

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