Recompiling firmware for minimOSD
« on: May 28, 2016, 08:25:57 am »
Hi, All,

Does anyone have instructions on how to recompile minimOSD? I do have the latest source, but I want to make some changes.

The code seems to be a bunch of Arduino IDE files (pretty much the renamed C++) and headers, but there are some external headers involved.

Also a big question is how exactly to configure options in OSD_Config.h to get the versions listed on the OSD setup page, LP_All_From_Revo2303.hex in particular.

The change I want to make is to always display the altitude (filtered barometric, panAlt) instead of gating it on the availability of GPS signal. In fact, I think it is a bug: it displays _home_ altitude unconditionally, but only show current altitude when the GPS signal is available. It should be vice versa in my opinion.

Another thing that bothers me is that the battery in LP_All_From_Revo2303.hex always shows zero, although it is hooked up to Revo and the voltage is correctly shown in GCS. Anyone has any idea why?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Recompiling firmware for minimOSD
« Reply #1 on: May 28, 2016, 11:33:46 am »
Hi, welcome.


You can find a some info here:
https://code.google.com/archive/p/minoposd/wikis/Compiling.wiki

For the All_from_Revo firmware you need REVO_ADD_ONS and remove all other define relative to analog inputs
Quote
The change I want to make is to always display the altitude (filtered barometric, panAlt) instead of gating it on the availability of GPS signal.


It works already like that for revo
https://bitbucket.org/f5soh/minoposd/src/c5d605229a085327d372bb0d69935a61c57c6e66/ArduCAM_OSD/OSD_Panels.ino?at=master&fileviewer=file-view-default#OSD_Panels.ino-146


Here is the 4.2m displayed as 4m in osd.

There is two altitude info in config tool, one (the absolute) is from GPS and the other from Positionstate, relative to home with Baro.

Because the altitude and voltage issue, maybe you don't use the right firmware ?

Be sure you see this boot screen and "Revo" at start.


Re: Recompiling firmware for minimOSD
« Reply #2 on: May 28, 2016, 04:29:25 pm »
Hi, welcome.

You can find a some info here:
https://code.google.com/archive/p/minoposd/wikis/Compiling.wiki

For the All_from_Revo firmware you need REVO_ADD_ONS and remove all other define relative to analog inputs

Thank you!

I'll try that. By the way what's the status of code.google archive? That service is closed for a long time, is there a danger that they remove the archive any time? Should it get saved somewhere more reliable and perhaps forked for LP mods?

Quote
It works already like that for revo
Quote
There is two altitude info in config tool, one (the absolute) is from GPS and the other from Positionstate, relative to home with Baro.

Aha, I see. I thought the Home Altitude is the a static value that represents the altitude measured only once at the point where the takeoff had occurred. So I never enabled it in the config tool as it I thought would be useless.

Quote
Because the altitude and voltage issue, maybe you don't use the right firmware ?

Be sure you see this boot screen and "Revo" at start.

Yes, this is the exactly same boot screen that I get. So the voltage is still a mystery. Will investigate more.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Recompiling firmware for minimOSD
« Reply #3 on: May 28, 2016, 07:44:17 pm »
Quote
So the voltage is still a mystery. Will investigate more.

Just flashed the LP_All_From_Revo2303.hex from Wiki.

Works fine here




Re: Recompiling firmware for minimOSD
« Reply #4 on: May 29, 2016, 08:58:44 am »
Oh, that was a mystery. I even connected a protocol analyzer (also known as FTDI dongle) to the tx pin, recorded the traffic, hacked a decoder and confirmed that the right voltage reports are indeed being transmitted:

OBJ:26962352 INS:0000 LEN:0028 TYP:20 SYN:3C
data 59 18 23 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 01 crc 25(25)
FLIGHTBATTERYSTATE v:10.193444(10.19) i:0 t:0 eft:0


Then, thanks to your screenshots, finally figured it out.
I was placing the voltage right under the time on the config tool. But the actual time takes two lines in firmware vs one line in config tool. So it was overwritten with text "E 0:00" which I was sure was the battery voltage display. "E", after all is sometimes used in electronics to denote the battery, and I thought there was some in character gen mismatch so I was getting E instead of V/A.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Recompiling firmware for minimOSD
« Reply #5 on: May 29, 2016, 11:56:01 am »
Every uavo you can see in UavoBrowser is transmitted over serial telemetry, according to his "meta" settings.

"E" refers to Estimated time left calculated from battery measurements.
FlightBatteryState > EstimatedFlightTime

https://bitbucket.org/f5soh/minoposd/src/c5d605229a085327d372bb0d69935a61c57c6e66/ArduCAM_OSD/OSD_Panels.ino?at=master&fileviewer=file-view-default#OSD_Panels.ino-1177

https://bitbucket.org/f5soh/minoposd/src/c5d605229a085327d372bb0d69935a61c57c6e66/ArduCAM_OSD/UAVTalk.ino?at=master&fileviewer=file-view-default#UAVTalk.ino-552