X-Plane 11.35b5 adds datarefs to read the contents of the X-Plane default FMS Control and Display Unit (CDU) screen.

The CDU is limited to 16 lines of text with 24 characters per line. Note that not all CDUs use all 16 lines – Some use a combined scratchpad/message line, others have an additional line under the scratchpad for messages. Some CDUs have four line selectable rows of data, others have 6. So while you can read data from CDUs of all sizes up to 16 lines, not all CDUs will fill 16 lines with content.

Text

The datarefs

sim/cockpit2/radios/indicators/fms_cdu1_text_line0

to

sim/cockpit2/radios/indicators/fms_cdu1_text_line15

and

sim/cockpit2/radios/indicators/fms_cdu2_text_line0

to

sim/cockpit2/radios/indicators/fms_cdu2_text_line15

contain the contents of each line as an UTF-8 string. Note that one character might need more than one byte of the dataref to display. You are expected to be able to read at least the following UTF-8 characters:

  • U+00B0 (degree sign): (0xC2 0xB0)
  • U+2610 (ballot box): (0xE2 0x98 0x90)
  • U+2190 (left arrow): (0xE2 0x86 0x90) to U+2193 (downwards arrow): (0xE2 0x86 0x93)
  • U+0394 (greek capital letter delta): (0xCE 0x94)
  • U+2B21 (white hexagon): (0xE2 0xAC 0xA1)
  • U+25C0 (left-point triangle): (0xE2 0x97 0x80)
  • U+25B6 (right-pointing triangle): (0xE2 0x96 0xb6)

More special characters might be added in future versions.

Formatting info

The datarefs

sim/cockpit2/radios/indicators/fms_cdu1_style_line0

to

sim/cockpit2/radios/indicators/fms_cdu1_style_line15

and

sim/cockpit2/radios/indicators/fms_cdu2_style_line0

to

sim/cockpit2/radios/indicators/fms_cdu2_style_line15

contain the formatting information for each character in the line as one byte (unsigned char) with the following special meaning:

  • The highest bit is set for a text displayed in large font. So use mask (1<<7) for the bit that tells you large vs small font.
  • The second highest bit is set for a text displayed in reverse video (colored background, black text). So use mask (1<<6) for the bit that tells you to invert the colors.
  • The third highest bit is set for a text displayed flashing (text being turned an and off periodically). So use mask (1<<5) for the bit that tells you to flash.
  • The fourth highest bit is set for a text with an underscore. So use mask (1<<4) for the bit that tells you to display an underscore under the character.
  • The remaining four bits encode the color of the text (or the background for reverse video): BLACK(0),CYAN(1),RED(2),YELLOW(3),GREEN(4),MAGENTA(5),AMBER(6),WHITE(7).

12 comments on “Datarefs for the CDU screen

  1. This is a nice new addition to the dataref pool. Now we can customize the default FMS with a little clever effort to add aircraft specific pages.

      1. Hello,

        Does it mean that X-Plane will have (in the future) multiple CDU types (different work algorithms) that all will use these datarefs? It’s great because then aircraft developers will not need to create custom datarefs for each new CDU model.

        This would be a best option.

        Or, otherwise they will able to write custom data to these datarefs, overriding the standard algorithm?

        Regards,
        Vlad

  2. This is really really great!
    It would also be really nice to get the Garmin screen from UDP, May be like the FLIR Image.

    Thx

  3. This is fantastic addtion, it finally makes it possible to suport default FMC with external apps / displays (I’m particularly happy because WebFMC will be able to add support for this, and it has been requested many times by WebFMC users) , and this is BIG! I was missing such datarefs and was hoping they’d arrive one day in X-Plane, but didn’t expect this to happen so soon. Thank you Laminar for implementing it!

  4. GREAT !
    I know that Philipp doesn’t want to give API access to the FMS, but just an extended version of the XPLMGetFMSEntryInfo to get more info about each wahpoint type would be all that is still needed to make a GREAT external Navigation Display !

  5. I got this working, but why dedicate 96 datarefs for each line of text? I realise that each character cell can have up to 4 bytes to represent the character, but the dataref is a float, which is 4 bytes.

    Why not have just 24 datarefs per line, where each dataref is a 4-byte Unicode value?

    Apologies if I missed something, but isn’t it inefficient to have to request 24x4x16 = 1536 datarefs instead of just 24×16 = 384 datarefs. This then leads to a huge overhead for sending each dataref value at the requested frequency back to the client, especially since most characters on the display are 8-bit values, so the bulk of the data will be discarded.

    Anyway, it does work, so thank you for implementing it.

  6. I got a simple text based version of this FMS screen working. It successfully mirrors the FMS display on the Laminar 737. The commands produce the same result as the on screen buttons on the FMS graphic. So all good so far. When I create an aircraft without a panel in planemaker it only shows a screen full of spaces and the sim/FMS/CDU_popup command shows the 430 GPS. So added a 2D panel and added the FMS panel under radios. Again, my program mirrors the screen just fine but now none of the key commands work. Any ideas how all of the above can be included in an aircraft built from scratch?

  7. The only issue for implementing the above is that even if you are making a home cockpit without any panel, you still need to add the FMS in PlaneMaker under Panel/Radios/FMS-GPS.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do not report bugs in the blog comments.
Only bugs reported via the X-Plane Bug Reporter are tracked.

Meta

Topic:

  • Data Access

Article type:

  • Tech Note

Version:

  • X-Plane 11