View Single Post
  #7   Spotlight this post!  
Unread 02-20-2015, 07:05 PM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: functions for auto

Preferably it would be the last line (with it at the first, theres a 20ms delay before any actions are performed)

Your indenting for everything after "wait" is now wrong

AUTOS should not be capitalized (and should be descriptive: "AutonMode", "SelectedAutonMode", "AutonEnum", etc)

turn and turn2 still need to be turned into feedback loops but for now rename them to turnLeft and turnRight and make one function- turn- that if gyro < desired than turnLeft(angle) else turnRight(angle)

capitalization schemes are wrong in Robot.java (http://java.about.com/od/javasyntax/...onventions.htm)

Code:
		if (autoMethod == Defines.AUTOS.AUTO_ONE) {
			return;
		} else if (autoMethod == Defines.AUTOS.AUTO_MOVE) {
			return;
		} else if (autoMethod == Defines.AUTOS.AUTO_TWORED) {
			return;
		} else if (autoMethod == Defines.AUTOS.AUTO_TWOBLUE) {
			return;
		}
this block of code is rather... erm...

Why is your wait function inside of a while(true) loop?

Last edited by Arhowk : 02-20-2015 at 07:09 PM.
Reply With Quote