ROBOTC.net forums
http://robotc.net/forums/

ftc remote control programming
http://robotc.net/forums/viewtopic.php?f=52&t=7393
Page 1 of 1

Author:  kkpanu9 [ Mon Dec 02, 2013 1:16 pm ]
Post subject:  ftc remote control programming

Our team has programmed the remote control period of the competition, but the code seems very bland. All it does is implement a simple tank drive and use various buttons for our attachments. Needless to say, it was a very short piece of code with no functions or new tasks. We saw another team's program for the remote control and it was very complex and long, but I don't know what it does. Am I missing something here, Or is there nothing "special" to put in the code?

Author:  MHTS [ Mon Dec 02, 2013 4:33 pm ]
Post subject:  Re: ftc remote control programming

Can you be more specific on your question? TeleOp is not very complicated if you just want basic driving and controlling of the robot. However, it depends on what your robot design is, there may be more complex code for dealing with specific design problems. For example, our team decided to explore swerve drive this year. Writing code for a simple tank drive is easy but swerve drive is a total different animal. After writing some simple code for swerve drive, our drivers gave feedback on some of the issues with swerve drive. So we had to do more complex code to fix the issues. Also, if you have a lot of subsystems that need to be operated concurrently, your code needs more complexity to handle multi-tasking.

Author:  BurningLights [ Mon Dec 02, 2013 5:45 pm ]
Post subject:  Re: ftc remote control programming

The simpler you can make your code, the better. If your code is simple looking, but does exactly what you want it to do, then there's no need to change it. Also bear in mind that the simpler the code, the easier it is to debug. You don't have hundreds and hundreds of lines of code to search through in order to find one small bug.

Author:  MHTS [ Mon Dec 02, 2013 11:48 pm ]
Post subject:  Re: ftc remote control programming

BurningLights wrote:
The simpler you can make your code, the better. If your code is simple looking, but does exactly what you want it to do, then there's no need to change it. Also bear in mind that the simpler the code, the easier it is to debug. You don't have hundreds and hundreds of lines of code to search through in order to find one small bug.

Or put the complex code into library modules and make sure they are fully debugged off season. So your main code still looks simple.

Author:  kkpanu9 [ Tue Dec 03, 2013 12:19 pm ]
Post subject:  Re: ftc remote control programming

What are library modules?

Author:  MHTS [ Tue Dec 03, 2013 4:27 pm ]
Post subject:  Re: ftc remote control programming

Library modules are just ".h" files that your main code includes. So if you put some of your code in functions and if your functions are generic enough, you should be able to reuse them year after year. For example, let's say you have some generic functions such as:
Code:
File: drive.h
DriveForward(int power, int time);
DriveForward(int power, float distance);
Turn(int power, int time);
Turn(int power, float angle);
TankDrive(int leftPower, int rightPower);
ArcadeDrive(int drivePower, int turnPower);

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/