Contributing atxxxx analog OSD support

Hello everyone,

I am new to PX4 development but a part time contributor to other firmwares; in my learning of PX4 and applying PX4 to FPV-style architectures i saw that the built-in atxxxx driver had barely anything in it and had baked-in configurations that required a firmware build to change. I decided to tackle this on v1.17 on my MicoAir H743V2 board. After some struggling with issues due to bad SPI assignment; i managed to significantly improve and enrich it, adding a wide variety of elements that we expect from FPV-world firmwares; and making it fully QGC-configurable in bitmask activation and X/Y position.

Power

  • OSD_BAT_VOLT: main battery voltage
  • OSD_CELL_V: average cell voltage
  • OSD_MAH: consumed battery capacity in mAh
  • OSD_CURRENT: current draw in A; and
  • OSD_POWER: electrical power in W.

Radio link

  • OSD_RSSI: RSSI in dBm when available, otherwise the normalized RC or telemetry-radio RSSI value; and
  • OSD_LQ: RC link quality.

GNSS and navigation

  • OSD_GPS_SAT: satellite count
  • OSD_GPS_SPD: ground speed in km/h
  • OSD_GPS_INFO: fix type, PDOP, and estimated horizontal position error
  • OSD_GPS_LAT: latitude
  • OSD_GPS_LON: longitude
  • OSD_ALT: local altitude
  • OSD_VARIO: numerical vertical speed
  • OSD_HOME_DST: distance to home
  • OSD_HEAD: heading in degrees
  • OSD_MISSION: mission state, including no mission, failure, warning, completion, and current/total sequence progress.

Vehicle and flight state

  • OSD_SYSID: system ID
  • OSD_MAV_STATE: MAV state derived from initialization, standby, calibration, active, critical/failsafe, and termination state
  • OSD_MODE: flight mode
  • OSD_ARM: armed/disarmed state
  • OSD_FTIME: elapsed armed flight time
  • OSD_THROT: throttle percentage
  • OSD_PITCH: numerical pitch
  • OSD_ROLL: numerical roll.

Warnings and status

  • OSD_STATUS: scrolling PX4 log messages and fallback vehicle status text
  • OSD_LOG_LEVEL: minimum PX4 log-message severity displayed
  • OSD_SCROLL_RATE: long-message scroll period
  • OSD_DWELL_TIME: pause at the beginning of a scrolling message.

The fallback status text covers missing vehicle status, failsafe, failure detector events, battery warning, RC loss, invalid attitude, invalid local position, invalid global position, missing home position, armed, ready, and not ready states.

Graphical overlays

  • OSD_AH: artificial horizon projected from vehicle pitch and roll
  • OSD_CAM_HFOV: horizontal camera FOV used by the artificial-horizon projection
  • OSD_CAM_VFOV: vertical camera FOV used by the artificial-horizon projection
  • OSD_CAM_UPT: camera uptilt compensation used by the artificial-horizon projection
  • OSD_CROSS: separately positionable center crosshair.

VTX, when CONFIG_DRIVERS_VTX is enabled

  • OSD_VTX_INFO: band, channel, and power-level index
  • OSD_VTX_FREQ: frequency in MHz
  • OSD_VTX_POWER: configured power label in mW

Some elements i haven’t had the chance to fully test and refine in detail, particularly the intended scrolling status and messages. It could still use some finer aesthetic/UI ajustments. Also, the default at7456 font lacks some glyphs usually found on other firmwares and is generally less refined. But it is working and usable.

It leverages some already existing code from MSP OSD and adapts some of it’s code as a common layer. I’ve verified it works with the OSD chip, but i do not have a video system that uses MSP OSD (ie: DJI) so testing would be appreciated from those who use it.

Master-based: GitHub - xznhj8129/PX4-Autopilot at improve-analog-osd · GitHub
Specific MicoAir H743V2 build: GitHub - xznhj8129/PX4-Autopilot at v1.17-micoair-h743v2-analog · GitHub
My specific 1.17 build backports the analog vtxtables module and changes some non-OSD things that were needed for compatibility with ELRS-Mavlink and the JHEMCU VTX; so it’s not universally applicable. Thisis the branch i’ve tested in flight.

I haven’t yet submitted a PR pending testing the master build and figuring out the procedure with regards to development; but i’m posting this here for everyone’s benefit.

1 Like