Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.
You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks!
The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!
See you on our MobiFlight Community Discord server.
A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.
The forum is still providing a lot of good content, hence we keep this information accessible.
Code:
#MCP SHOW IAS INDICATOR Dataref iasshow laminar/B738/autopilot/show_ias int Offset 0x656D UINT8 1 r $iasshow #MCP IAS KTS/MACH INDICATOR Dataref iasmach laminar/B738/autopilot/mcp_speed_dial_kts_mach float Offset 0x6586 FLOAT64 1 rw $iasmach
The dataref you are looking for is laminar/B738/autopilot/show_ias. I've included my dataref code below. The offset should be changed to work with whatever memory usage scheme you are using.
XPUIPCOffsets.cfg
Code:
#MCP SHOW IAS INDICATOR Dataref iasshow laminar/B738/autopilot/show_ias int Offset 0x656D UINT8 1 r $iasshow #MCP IAS KTS/MACH INDICATOR Dataref iasmach laminar/B738/autopilot/mcp_speed_dial_kts_mach float Offset 0x6586 FLOAT64 1 rw $iasmach
Within MF setup two outputs in the main config. I called mine MCP_IAS_DISPLAY and MCP_IAS_ACTIVE. DISPLAY is the item that will be connected to a 7-segment display. Its display will be cleared when the ACTIVE output is false or 0.
Here's the step-by-step:
Create MCP_IAS_ACTIVE
- Set MCP_IAS_ACTIVE to FSUIPC Offset.
- Set the offset to '0x656D' or whatever you choose to use.
- Set the value type to 'int', the Size to '1' and the mask I just left at '0xFF'
- Click 'Okay'. This one is complete.
Create MCP_IAS_DISPLAY
- Set MCP_IAS_DISPLAY to FSUIPC Offset
- Set the offset to '0x6586' or whatever you choose to use.
- Set the value type to 'float', the Size to '8'.
- Check the transform box.
- Enter 'if($<1,($*100+.5)*#,$*#)' within the Transform textbox.
(Note: The math uses the ACTIVE dataref to zero the IAS when it is not displayed and round the mach speed to align with the sim with mach is displayed.)- Under 'Config References' Add a reference to MCP_IAS_ACTIVE using # as the character ref.
- Next select the 'Compare' tab at the top of the screen.
- In the 'Comparison Settings' frame select the check box. Then enter the following:
- If current value '=' '0'
- set it to ' '
(Note: Enter a single space in this textbox. Leaving it with no space will cause a '0' to show on the IAS Display.)- else set it to '$'
- On the 'Display' tab check 'Use Left Padding'
- Select 'Space' as your Padding character
- On the Compare tab check 'Apply comparison to modify the current value'
Thanks pizman82 for the fix here.
- If current value '=' '0'
- set it to ' '
(Note: Enter a single space in this textbox. Leaving it with no space will cause a '0' to show on the IAS Display.)- else set it to 'if($<100,'.'+$,$)'
![]()
While this setup will display the mach and kts airspeed at the appropriate times, the mach airspeed will not have a decimal in front of it. If you or anyone else has fix for this please share it.
Cheers!
Also I noticed the rounding problem. To address this I simply used the Round function.
pizman82
So yes... It should be then something like if($<1,Round($*100,0),$)*#
In words... If value is below "1"m then multiply by 100 and round it to Zero Decimal Numbers.... (e.g. 0,62999 goes via 62,999 to rounded 63)
pizman82
if(§=1,888,if($<1,Round($*100,0)*#,$*#))*X
I hadn't even thought about the light test functionality or cold and dark. That is something to add to all of the MCP lights and displays.