Quote:
Originally Posted by Christ
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