View Single Post
Old 06-20-2008, 08:59 AM   #352 (permalink)
awillard69
EcoModding Apprentice
 
awillard69's Avatar
 
Join Date: Feb 2008
Location: Streamwood, IL
Posts: 105

Dakota - '00 Dodge Dakota Club Cab, Sport
90 day: 18.57 mpg (US)

Jeep - '01 Jeep Wrangler TJ Sport
90 day: 18.46 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
Code suggestion:

Unless there is a reason not to, I recommend moving the code:
Code:
  #ifdef debuguino  
  Serial.begin(9600);  
  #endif
as the first code executed in the setup() function. In v.63, it's run as the 14 statement in the function.

During my testing I needed to know that my device was running immediately, so I made it the first thing that runs.

On a side note, many, many posts back I offered a suggestion that eliminating the C++ portions of the code may contribute to a smaller compiled size. Well, I did a rewrite, eliminating all the object code (using structs and functions) and found that the compiler does a good job of simplifying the code - my code was within a few bytes! So, nothing saved.

I did encounter an issue in that the arduino v0011a software has no obvious provisions (that I could find) for sending extra parameters (ie switches) to the compiler. I found that out when I was trying to code a try...catch block while debugging, the exceptions code is not enabled by default and must include a compiler switch to activate. Assuming the developers have sent all the relevant optimization parameters, adding more parameters may lead to a bloat of the compiled objects.
__________________

  Reply With Quote