First try with ardu communicate

I am sorry for a late , but lastly I had really lot other problems so no time at all for any "flash" work .However I made few lines of code to made possible communicate sending to OSD from any external devices , so from Ardupilot also - anyway that was the base reason . HappyKillmore already wrote about it - but here detailed descryption of message format .So we can deliver information to display on OSD at location x,y looks like that :[leading character][text message][ending character][ending space]ending space is displayed always after mesasage.String to OSD shoult look like that :"$MXXYYLLEEabcd"must be end by enter character CR LF linefeed and carriage return .$M - means that it is meassage to display (M must be uppercase)XX - is a x coordinate on screen , must be hex valueYY - is a y coordinate on screenLL - is leading character hex value from font tableEE - is ending character hex value from font tableabcd - is a "text message" to dispalay (for now can be 30 char long)when LL or EE is Hx00 - then will be not displayed at allwhen text message is "" [empty] then also will be not displayedSo string to OSD can be like that in C Arduino sampleserial.println("$M050a4a4bI like that")so at location x=05 y=10 will be displaed this :" <<I like that>> "as you see LL is 4a it means [<] char and EE is 4b it means [>] char .or can be done like this way:[code]serial.print("$M") //header for messageserial.print("050a") //x and y coordinatesserial.print("4a4b") // leading and ending characters(graphics)serial.println("I like that") //message with LR CR ends string[/code]This is exactly how is working this function in OSD now .As advantage of this system when we define most significant bit of XX coordinate for 1 then we choose small fonts for text message display (only capital letters) - when is 0 then default big letters are displayed from characters table capital and small letters .[code]XX |= (1<<7) // set 7 bit for small charactersXX &= ~(1<<7) //reset 7 bit for big characters[/code]To be possible custom screen configuration , need of understanding how it is work .The screen is divided on net where the charcters are writen .The grid is 30x16 with PAL mode nad 30x12 in NTSC mode .Looks like that:[code]. X------>Y 1 2 3 4 5 6 7 8 ... 29 30: 2: 3: 4v 5. .. 15. 16[/code]So when we made configuration we just teel the program where on the screen we want first character(or graphic) of our information - up left corner is coordinates X,Y (1,1) , bottom right corner is X ,Y (30,16) - remembre that NTSC mode Y must be no more than 12 .How do we know what mode are currently in use ? - we will see after OSD init logo .I foloowed of mmormota idea about add to OSD firmware ability to display any custom information delivered by RX input at the same baud rate with GPS module .So if anyone have external device with GPS and retransmitiing GPRMC GPGGA messages , OSD can be used in usuall way - inluding autodetecting baud rate .But also in middle of NMEA messages is possible to put custoom dispaly instruction - all described detaily in post above .So here is the beta version of firmaware 1_60 - mostly for mmormota to test with ardupilot software .It is working exactly as remzibi OSD (including GPS configuration commands sent at begining by TX line after baud rate detection) plus ability to display any custom oinformation delivered by UART(com port) in the middel of NMEA messages , format described in post above :"$MXXYYLLEEabc"So with this solution there are a bit solved problem of insufficient space in OSD's chip . maybe will be possible also displaynig artifical horizon and pitch using characters E0 to E7 from character-font table .Here is my imagination of artifical horizon .Too smal chip not allowed to made it in OSD for roll - but in Ardupilot that counting can be done and using "$Mxxxxx" mesages - that should be possible - as well as pitch .a2721448-192-horizon.JPGSo for now are avaliable to firmwares for OSD , first as display termional only working without GPS named no_gps.hex and second normal OSD firmware OSD1_60.hex with ability to display anything in the middle of NMEA commands .No GPS firmware can be downloaded here - 1_60 firmware is already avaliable with PC software update - or here - pictures of possible connections .I hope that this firmware will help for many peaples doing his own project and will made poor man's OSD more open to world , also be more universal to variouse usage in many other project , not only flying platforms .
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones