View Single Post
Old Nov 11, 2012, 07:58 AM
Dennis Frie is offline
Find More Posts by Dennis Frie
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,368 Posts
Quote:
Originally Posted by XDreamer View Post
You are my hero anyway.

I'm planning to simplify the code, as I have made to many copy-pastes and have lost track of what is what. I started with the source from El_Nono in this post: http://www.rcgroups.com/forums/showp...postcount=1758
And his spanish comments / variable names did not make it any simpler. But Google Translate helped me.

I will post a zip with my OSD code soon, I will just clean it up a little bit.

In the future I'm thinking of something like this:
Code:
if (line >= line1Start && line < line1Start + line1Height) {
    printTimer(line);
    delay(20);
    printHomeArrow(line);
    delay(20);
    printBattery1Voltage(line);
}
else if (line >= line2Start && line < line2Start + line2Height) {
    printGpsCoordinates(line);
    delay(20);
    printBattery1Current(line);
    delay(20);
    ....
}
And text could be written like this:
Code:
printText("HELLO");
Of course, this could be impossible with the timing restrictions and the slow Arduino.
That would definitely make it a lot easier to customize. I just wrote the software for my own preference

I have moved on to other projects, but I'm still around if you need help with anything specific. I have a few things in mind regarding OSD, but it will be coded for MAX7456 instead.
Dennis Frie is offline Find More Posts by Dennis Frie
Last edited by Dennis Frie; Nov 11, 2012 at 08:08 AM.
Reply With Quote