Go to Post Will we finally get to play music on our robots for once!? - Hitchhiker 42 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 22-05-2016, 07:59
michaelyork michaelyork is offline
Registered User
FRC #3680 (Elemental Dragons)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2014
Location: Statesville, NC, United States
Posts: 19
michaelyork is an unknown quantity at this point
Re: Code Review: Semi-Novice

Quote:
Originally Posted by mikets View Post
We don't do command based programming and also not knowing what each subsystem is supposed to do, I just looked through the code and found a couple of minor optimizations on boolean expressions.
Code:
    	...
    	if(button10left.get() && !button10LeftLast) { 
    		button10LeftLast = true;
    		compDisable = !compDisable;
    	}
    	...
    	Intake.isFinished()
    	{
   		return !RobotMap.intakeOutSwitch.get();
    	}
Thank you! I'll get those fixed up ASAP.

Quote:
Originally Posted by Lireal View Post
The major issue I see with your code is that you are using the sybsystems and RobotMap completely wrong. Your RobotMap should only include really include numbers. All of your motor controllers, sensors, etc. should be a in your subsystems. Read through these examples and you will see how to do it: https://wpilib.screenstepslive.com/s.../13809/c/88893
Oh gosh, I didn't know I was doing it wrong this whole time. I'll definitely beg our team to get a new control system so I'll be able to practice with doing it the right way. Thanks!

If anyone else sees something wrong with my code, please let me know. I'm making a bit of a list of stuff I need to practice.
__________________

FRC Team 3680 - Head Programmer (2014-), President (2016-)
2014 - North Carolina Regional Creativity Award
2016 - North Carolina District Qualification (UNC Asheville Event) Winner, Judge's Award
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:43.

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