Go to Post Quitting FIRST was so hard that I felt like I needed a 12 steps program to help me through it. - Ken Leung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 25-03-2012, 18:58
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: How does your team architect its codebase?

Our code design always falls along functional lines, with the code modules closely following the moving pieces of the robot and communications channels. Most of the robotic projects I do at work turn out the same way. This year the different pieces include:

main - starts all other tasks and services comms with the driver station
auto - autonomous/hybrid behavior, reads and execs a custom script language
wheels - starts and monitors all drive wheel servos, crab, spin, measured movements
gatherer - runs the 4 ball gathering systems and the elevator
shooter - runs the servos for turret position, wheel speed and the feeder
targeting - runs the camera and processes images
dashboard - collects and sends dashboard data
monitor - monitors the health and status of the other modules

Each piece/module is in a separate task, all derived from a common class. Each spins in an endless loop reading a message queue and performing the duties requested. It makes debugging easier, it is like 8 different smaller less complex programs. Since they are in separate tasks we can adjust their relative priorities using the operating system (taskPrioritySet/Get).

HTH
__________________
Fast, cheap or working - pick any two!
 


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 05:45.

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