is there any tutorials on the new java??
I personally don’t know anything about programming, but you could check the internet if you haven’t yet. Here, let me help.
What about the new Java?
Are you looking for documentation on the WPI Library APIs that we use in FRC? If so, all of the previous documentation is more or less applicable- those haven’t changed much at all.
If you are looking for documentation on new features that we get by switching to Java 8 SE, then I would recommend starting with the Java 8 release notes from Oracle. You will also want to search for the Java 7, Java 6, and Java 5 release notes. You can also find an countless number of tutorials, guides, and tips for Java 5-8 online.
Try looking at my teams example drive train code here
I’m very curious why you have like 4 classes just for drivetrain? I just make a quick method and it’s over with. Nothing too fancy unless it has to be. In fact I don’t know why people make othe classes for stuff when coding for FRC. If you are willing to enlighten me I would be very interested to know why you do that!
I can’t comment on this specific case, but by using independent classes, the code can be developed by multiple groups who don’t know anything about the code another group is working on. When the final code is written, the only information needed is the names, functions, and arguments of relevant methods for each operations that is to be performed.
In general, breaking up code like this can be helpful since it helps keep issues isolated. If something needs to be rewritten, it is probably going to be limited to one class instead of the entirety of the project.
It also makes the code more readable, which is the key to programming.
Well, I’m my specific case It is just me working on our code. So I programmed for every possible drive train except swereve because my team doesn’t know what their doing for a drive train, we have had talks of all of them…I’m going to update my github repositories today and that code has examples for all the drive possible except swerve. Most of them are not fully tested.
what is the “package org.usfirst.frc.team3019.robot.subsystems;” mean
This is the auto generated package for a command based robot. There are 3 different packages auto created. robot.subsystems, robot.commands, and just robot.
explanation of each package:
Robot.Subsystem: This package contains classes to hold motor instances, sensors, pnumatics. In each class there are also methods to move each motor and read the sensors.
Robot.Commands: This package contains the classes that tell the subsystems how to act. For example the class DriveStraight class tells the driveTrain subsystem to drive untill X condition happens.
Robot: This package contains the 3 main classes: Robot, RobotMap, OI
- Robot: This is the main class of the Robot, instantiates all the public static subsystems and sets the autonomous command.
- RobotMap:Holds all the constants of the Robot so there is not a bunch of magic numbers in the code, generally using a single class for all constants is bad practice, however use it for now.
- OI:Holds the joysticks and the joystick buttons and binds the buttons to the commands
Since this is an article about getting help, I wanted to ask how to begin a thread on chief delphi. I might just be completely overlooking something, but I don’t know how to ask questions on this site. If anybody could give an answer, that would be of great help. Thanks
On the top left, click on forums, then go to a specific forum, for example, programming. Then above all of the threads, there’s a blue button that says “new thread.”