Go to Post I then asked if I could use a flux capacitor for power, but that didn't go over too well, either (they did say I could use it for decorative purposes, though). - Kevin Watson [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
  #7   Spotlight this post!  
Unread 26-02-2007, 18:09
meatmanek meatmanek is offline
Programmer/physicist/mathematician
FRC #0868 (TechHounds)
Team Role: Programmer
 
Join Date: Mar 2004
Rookie Year: 2004
Location: Carmel, Indiana
Posts: 142
meatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to behold
Re: Lowering the voltage on a spike

For your own sanity, please don't just say 'pwm01 = 155; // slow forward.'
do this instead:

Code:
#define DRIVE_SLOW_FWD 155
#define DRIVE_SLOW_REV 99

// other code...

pwm01 = DRIVE_SLOW_FWD;
For one, it saves you a comment every time you use that value
for two, if you ever want to change the value, you don't have to find'n'replace 155

But, to allow you to save face, I'm going to assume that you replaced your #define or equivalent with 155 when you pasted for clarity.
This comment was directed toward new programmers.
__________________
Real programmers use vim.
 


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
What is best for lowering the middle wheel? Jeff K. Technical Discussion 9 28-01-2006 12:49
Lowering the Bar? Aignam Regional Competitions 4 07-03-2004 23:13
Raising the bar...or lowering it? Ben Mitchell General Forum 29 13-01-2004 03:30
Problem with Lowering the Bar Kevin Kolodziej General Forum 14 12-01-2004 21:58
Voltage Byte -> True Voltage Ulibrium Technical Discussion 11 01-03-2002 08:55


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

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