View Single Post
Old 01-16-2009, 12:21 AM   #209 (permalink)
tech2
EcoModding Lurker
 
tech2's Avatar
 
Join Date: Jan 2009
Location: ARKANSAS
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Christ View Post
LOL - I got the correct notation in my email - but the forum ate the spaces again.

And, although I can't code, and know not alot about programming in general, I can actually read and understand most of that... what language is it?

PS - in my email, I saw this:

*
.......for (i = 0; i < 8; i++) {
...............// check current
...............ADCSRA |= 64;
...............while (ADCSRA & 64); // Do nothing until the conversion is done.
...............current = ADCH;
...............if (current > currentLimit) {
.......................correction = (1 << i);
.......................if (gentleThrottlePos >= correction) {
...............................gentleThrottlePos -= correction;
...............................OCR1AL = gentleThrottlePos;
.......................}
.......................else {
...............................gentleThrottlePos = 0;
...............................OCR1AL = 0;
...............................return;
.......................}
...............}
...............else {
.......................return; // Ya! Current is under control.
...............}
.......}
*

By the way, the exact posting background color code is #F5F5FF, for anyone interested. I hate reading page source.
Looks like just good ol C++ TO ME
__________________
I always did want to play around with this stuff, now I have a chance to do so
  Reply With Quote