Go to Post Can you describe how you utilized your human head device on your intake? - Kevin Ainsworth [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

 
View Poll Results: Would you like to see a coding convention put in place?
Yes 17 80.95%
No 4 19.05%
Voters: 21. You may not vote on this poll

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 04-01-2004, 17:43
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Coding conventions

For the past month or so ive been reading the forums at least daily and i've notice one little problem in our programming corener over here; we need some base-line conventions for the ease of people just joining in and people new to programming. I would like to propose a few:

1) If possible, replace pwmXX with some sort of macro throughout the program. That is, instead of putting pwm01 and pwm02, put R_MOTOR and L_MOTOR. Or at least state it at the beginning of your post. More than once, i've been readong code and said to my self, "What the heck does pwm03 do?"

2) We should set down a base-line as to whether we should assume the flipped motor is later software corrected or not (a line at the end of the code somewhere along the lines of R_MOTOR=254-R_MOTOR;). I know last yaer we did just because the default code came with the reversal, but this year I've seen both (i.e. forward being both motors at 200 and assuming one will be flipped latter on and forward being one motor at 200 and one motor at 54)

3) MACROS IN ALL CAPS, varables in all lowercase. Just for ease of mine and quick reference.

Does anyone have any other ideas? Would we like this sort of thing? Gimme your input. Thanks.

-Kesich
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
Autonomous Mode Strategy Brian48216 Programming 27 23-01-2003 14:47
coding, motors, spikes, help archiver 2001 3 24-06-2002 00:48


All times are GMT -5. The time now is 00:34.

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