View unanswered posts | View active topics It is currently Fri Oct 31, 2014 6:10 am






Reply to topic  [ 6 posts ] 
ftc remote control programming 
Author Message
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post 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?


Mon Dec 02, 2013 1:16 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post 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.


Mon Dec 02, 2013 4:33 pm
Profile
Expert
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 158
Post 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.

_________________
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at http://cof7468.weebly.com/.


Mon Dec 02, 2013 5:45 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post 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.


Mon Dec 02, 2013 11:48 pm
Profile
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post Re: ftc remote control programming
What are library modules?


Tue Dec 03, 2013 12:19 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post 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);


Tue Dec 03, 2013 4:27 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.