MobiFlight Community Support

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! 

05/03/2024 - This forum is read-only

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.

icon
Avatar
qqwertz
Posts: 2
Hello,

I am building a home cockpit for the Milviz KingAir 350i in P3D using Ruscool captain's left and right panels ( https://www.ruscool.co.nz/king_air_350.html ), which are each connected to my PC via an Arduino Mega 2560. I am pretty far with these two panels, but I am running into a problem with Mobiflight.

The panels have several switches with three positions (e.g., Autofeather ARM/OFF/TEST). When I manipulate these switches via Linda using the respective Lvars, they are typically mapped to Lvar values 1,0,-1. I can get the 0 and 1 values to work correctly with Mobiflight via FSUIPC offsets, but the value -1 usually creates problems. Very often, the switch in the VC then takes the same position as the +1 value instead of the -1 position (as determined via Linda).

My guess is that the Milviz Lvar is a signed integer, and Linda sends signed integer values to P3D. However, Mobiflight appears to send unsigned integer values to FSUIPC. I tried to enter 127, 128 or 255 instead of -1. I also tried to use a 2-byte integer and enter values > 32768, and 4-byte integers, but that only resulted in other switches to move as well.

Is there any way to send negative values to FSUIPC in Mobilflight?

Thanks,
Peter
2020-10-03 16:41
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

I not know that problematc......


Technical "-1" Signed represent 255 unsigned. So if there is a issue in signed /unsigned a exetuded value of 255 is the same like "-1" aslong we talk about 1byte INT
Good Luck !
2020-10-04 00:35
Avatar
qqwertz
Posts: 2
Hello Pizman82,

thanks for your reply, which encouraged me to dig deeper. I now resolved the issue: I adapted a code that was posted on this forum about how to handle FSUIPC offset. That code used read and write procedures for unsigned bytes rather than signed bytes. Now the panels almost work perfectly, thanks to Mobiflight.

Cheers,
Peter
2020-10-04 18:34
icon