Go to Post I walked out to the area where the robot was getting ready to move, and there's no room near the robot. I look again, and realize it's all students. - rachakate [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 20-02-2012, 12:40
rzoeller rzoeller is offline
MN GOFIRST Recruitment Officer
AKA: Ryan Zoeller
FRC #2169 (RI3D 'Snow Problem; KING TeC)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2007
Location: Savage, MN
Posts: 111
rzoeller is a jewel in the roughrzoeller is a jewel in the roughrzoeller is a jewel in the rough
Re: Using throttle to manipulate Autonomous Mode

This may not be what your looking for, but we have found it easier to use inputs from the Driver Station itself instead of a joystick. It allows you to set multiple autonomi up and accurately pick which one to use, instead of relying on a throttle which may get bumped.
__________________
Ri3D - 'Snow Problem Programmer
MN GOFIRST Recruitment Officer
FRC 2169 Alumni
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2012, 14:56
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: Using throttle to manipulate Autonomous Mode

instead of using axis=1 or axis=-1, use axis>0 and axis<0. It is (almost???) impossible to get it at exactly 1, so both would be false, meaning that both would run
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2012, 20:15
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using throttle to manipulate Autonomous Mode

The other comments will improve the code, but you will still find an odd jerk at the beginning as the while loops will both run at least once. You may find it even a bit better to surround the loop with a case statement and change the loops to run forever. The case can be the Boolean results of the compare, or you convert it to an enum or integer using scaling, and put the code in various frames of the case.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2012, 20:54
MAldridge's Avatar
MAldridge MAldridge is offline
Lead Programmer
AKA: Rube #1
FRC #0418 (LASA Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Austin
Posts: 117
MAldridge will become famous soon enoughMAldridge will become famous soon enough
Re: Using throttle to manipulate Autonomous Mode

That has got to be the most creative use of the while loop I have ever seen! I would suggest that, since has already been mentioned, you put your code into a case structure, and you use the DS switches wired into a build array. Then you can do a boolean array to number and have up to 2^8 autonomous modes!
__________________
'Why are you a programer?' --Team Captain
'Because the robot isn't complicated enough!' --Me
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 22:07.

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