Thread Tools
Nov 11, 2012, 04:17 AM
Registered User
Quote:
Originally Posted by XDreamer View Post
I must say the output code is a big mess... Not hard to understand, just too "straight forward".

Look at output.cpp and start commenting out entire ifs in the detectline-method. For example, if you comment out this line (and the next 240 lines):
Code:
else if (line > toplinenumbers  && line < (toplinenumbers + 9)) {
...you will remove the speed and altitude numbers. Just continue doing the same thing for the other lines you don't want, but compile and test the code after each change.

I have done quite a lot of changes in the output code, but the code is still not looking good. Some major refactoring has to be done, but I don't know if the timing allows it.
thanks helped me !

Now i am done stripping made it from 27.296 Bytes to 2.828 Bytes
Plenty of room to add my own stuff now
Last edited by nabazul; Nov 11, 2012 at 04:25 AM.
Sign up now
to remove ads between posts
Nov 11, 2012, 04:45 AM
Registered User
Quote:
Originally Posted by nabazul View Post
thanks helped me !

Now i am done stripping made it from 27.296 Bytes to 2.828 Bytes
Plenty of room to add my own stuff now
Wondering what you're planning to add.
Nov 11, 2012, 04:54 AM
Registered User
XDreamer what kind of changes did you make? Anything useful for the rest of us?
Nov 11, 2012, 05:39 AM
Just another user
Dennis Frie's Avatar
Quote:
Originally Posted by XDreamer View Post
I must say the output code is a big mess... Not hard to understand, just too "straight forward".

.
Yup, unfortunatly the entire code is quite a mess and pretty hard-coded. I never expectged that anyone but me should look at the code - sorry guys
Nov 11, 2012, 05:40 AM
Just another user
Dennis Frie's Avatar
Quote:
Originally Posted by nabazul View Post
got my osd running now did a mistake feeding the osd into the videostream. Now i am planning to use this without a gps so i want to strip down the code to FlightTime and Input voltage (G-Osd Style). Any hint where to start the best without messing everything up ?
Please note that the timer uses GPS-time, so you have to change it to a timer instead.
Nov 11, 2012, 07:46 AM
Registered User
Quote:
Originally Posted by Dennis Frie View Post
Yup, unfortunatly the entire code is quite a mess and pretty hard-coded. I never expectged that anyone but me should look at the code - sorry guys
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: https://www.rcgroups.com/forums/show...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.
Nov 11, 2012, 07:58 AM
Just another user
Dennis Frie's Avatar
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: https://www.rcgroups.com/forums/show...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.
Last edited by Dennis Frie; Nov 11, 2012 at 08:08 AM.
Nov 11, 2012, 09:12 AM
Registered User
Quote:
Originally Posted by dziedrius View Post
Wondering what you're planning to add.
i want to hook up 2 channels from my rc receiver to the osd to control stuff with my radio but so far i am very unsuccessful

Connected one to D2 and used interrupts to determine pwm pulsewidth result is that the osd and the whole image starts to flicker. however i can control the flicker with my radio
Nov 11, 2012, 09:39 AM
Registered User

stripped down code


Quote:
Originally Posted by nabazul View Post
thanks helped me !

Now i am done stripping made it from 27.296 Bytes to 2.828 Bytes
Plenty of room to add my own stuff now
Hi Nabazul,
That looks good !
I am interested in seeing your stripped down code for this screen shot
Thanks for posting
Rick
Nov 11, 2012, 09:46 AM
Registered User

Max7456


Quote:
Originally Posted by Dennis Frie View Post
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.
So Dennis, do you have a schematic for the MAX7456 project or are you starting with something like this
https://www.sparkfun.com/products/9168 ?

Rick
Nov 11, 2012, 09:54 AM
Just another user
Dennis Frie's Avatar
Quote:
Originally Posted by RickEis View Post
So Dennis, do you have a schematic for the MAX7456 project or are you starting with something like this
https://www.sparkfun.com/products/9168 ?

Rick
Atm I have just soldered a MAX7456 on a breakout-board for initial testing (and the necessary components).
(3 SMD-caps on top left, crystal under the PCB, a few resistors etc)



The first test-versions of the PCB have been designed and shipped from production.
(PCB design have been updated a bit since this picture, but don't have it on this PC)


Another idea.. But not the one I have been choosing at the moment.



Latest version is with 0603 components, voltage-regulator, more capacitance and later I need to break-out some more pins for I2C etc.
Last edited by Dennis Frie; Nov 11, 2012 at 10:00 AM.
Nov 11, 2012, 10:02 AM
Registered User
Quote:
Originally Posted by msev View Post
XDreamer what kind of changes did you make? Anything useful for the rest of us?
These are the changes from stock 0.18:
  • Smaller font
  • Monitoring two battery voltages
  • Moved the timer to a row in the top
  • Added number of satellites (not thoroughly tested)
  • Made it configurable to show current sensor numbers
  • Battery bars and compass (configurable)

Most of this was done by El_Nono, I just added a couple of things and moved stuff around! And I don't think my version will work for everyone without tweaking it.

I think the smaller font will only make this useful when using FatShark Dominators or an LCD.display.
Nov 11, 2012, 10:03 AM
Registered User
rimshotcopter's Avatar
Dennis, you really should make this board for sale or license it for other to sale.
Nov 11, 2012, 10:11 AM
Just another user
Dennis Frie's Avatar
Quote:
Originally Posted by rimshotcopter View Post
Dennis, you really should make this board for sale or license it for other to sale.
It's a work in progress - and I have just started. I don't really have any plans with the project, but I'm always open for ideas.

At the moment I need to design some graphic/characters - don't really have the patience for that
Nov 11, 2012, 10:56 AM
Registered User
Quote:
Originally Posted by Dennis Frie View Post
It's a work in progress - and I have just started. I don't really have any plans with the project, but I'm always open for ideas.

At the moment I need to design some graphic/characters - don't really have the patience for that
Very cool Dennis !!!

Can you post a schematic for us to work with ?

- I'm sure there is someone out there who could help with the graphic/characters

Rick


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Diy osd karl k FPV Talk 2 May 03, 2011 12:31 AM
Idea New DIY OSD? atari7202 FPV Talk 1 Mar 25, 2011 12:08 AM
Discussion see my own diy OSD video Passion Aerial Photography 7 May 27, 2010 01:28 AM
Discussion REAL homebrew DIY OSD - Check it out! jafoca FPV Talk 8 Jun 29, 2009 06:52 PM
Discussion picoOSD DIY PIC12F683 based OSD in C kbosak FPV Talk 6 Jan 31, 2008 07:47 AM