Jump to content
The simFlight Network Forums

flyingjayaraj

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About flyingjayaraj

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling
  • Location
    india

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Pete, i was able to read the values and get the displays going. now i have another roadblock as i have jumped to Captain Sim 757, seems to be a better model and they have a published SDK. Using the same code i was able to display the MCP Altitude on the 7segment - using the L:var. values Now to use the knobs i checked the SDK and its says the following. - ---------------------------------- HOW TO RETURN DATA FOR MOMENTARY ACTION SWITCHES 1. Convert the element's name into an ID number. For example, for the G02_003_BUT. - remove all underscores and the ending to get G02003. - change the first letter to a number according to the table below: C=13 G=17 L=22 O=25 P=26 R=28 So an ID number for the G02_003_BUT is 1702003. 2. Set the ID number to the L:klid variable. This will simulate a user's click. FOR KNOBS ( _KNO) 1.Convert the element's name into an ID number. 2. Add the - (minus) for counterclockwise rotation. For example: (L:klid) = 1702003 - clockwise rotation. (L:klid) = -1702003 - counterclockwise rotation FOR ALL OTHER ELEMENTS Set the required value to a variable. E.g. to press the G02_003_BUT: (L:G02_003_BUT) = 1 ---------------------------------------------------------------- I Used the data and i was able to come up with the ID for the MCP Airspeed = 1703010 How would i set the ID number to the L:klid variable to simulate a user's click / knob rotation ???? 😞 i tried (L:klid) = 1703010 , but it does not show up in the fsuipc list. ☚ī¸ CS757CAPTAINIII_MANUAL_PART6.pdf
  2. while true do n=ipc.readLvar("L:alt_sel_num") ipc.writeUD(0x66C0,n) ipc.sleep(100) end When i run this script through lua-edit , i get an error - runtime error at line 1
  3. Hi pete, Initially i was under the impression that i had to update the values both ways. In my case the the encoder is working fine and i am able to change the MCP altitude, its just issues displaying that value on the 7-segment. so i guess in my case it would be to read the value and write that to a free offset, and there after read the value from that offset my case (0X66c0) But i am not sure about the interval and how to keep it running ☚ī¸ first = true while true do if first then initialALTVal = ipc.readLvar("L:alt_sel_num") ipc.writeUD(0x66C0, initialALTVal) first = false end end And i added to the fsuipc.ini file - In order to automatically run the script. [Auto] 1=Lua b75200 I have also ensured that that its "b75200"
  4. Hi Pete, Mobi-flight is a software and they also provide the firmware to drive the Arduinos that are required for the home MCP. It isthe Arduinos that drive the 7 segment display, i have attached a snap of the home mcp, it's a very basic one. 🙂 I shall monitor - the Offset via FSUIPC and update you regarding that. In the mobiflight software interface i do get the FSUIPC log , it gives me exactly whats displayed in Simulator MCP Altitude window. "I can understand using an L:Var to obtain a value " - this technique was recommended by another person who had the same issue and sorted it out. I was hoping to try it out and see if its works, incase it gives me better results i would stick it with, else at least i would have learnt something new 🙂
  5. Hi Pete, thanks a lot for the reply. apologies for my delayed response. Mobiflight is the software, that i am using to build my home MCP, Sim software - Quality Wings 757 - They dont have a published SDK to check what offsets and event IDs have been used. and being a 757 there are very few pilots who want a build a home sim for the variant, however i did find one pilot and he had the same issues with the 7-segment mcp altitude. I am unable to use the standard offset - 0x07D4 for the Altitude display, as when i rotate the encoder, the altitude changes in the Sim software, but on the 7-segment display it works initially but after a while it tends to not keep up. the encoder is using the event ID and works fine, i have tried different encoder and different pins on the arduino but the same issue persists. All the wiring / power lines and grounding have been double checked I was advised to read the local L:Var by accessing the Guage value - assign this to a free offset in FSUIPC and then use that free offset in Mobiflight software to display the MCP altitude on the 7-Segment. I know accessing the guage value is slow, but as long as i can have a operational MCP altitude display its acceptable. If i have got the process wrong please do advise me, as i am going only by google searches. The L:var is - L:alt_sel_num Free Offset i used in the code - 66C0 Using this i came up with the code by replacing the values - " Anyway, the normal way of dealing with these things, and one which i've used in several case of encoder+display going back many years, is to update the display locally, directly from the encoder changes, whilst also feeding the latter to the sim, only reading values to display when the encoder changes have paused for a measurable time, like half a second or so. " In case you can advise me on how to achieve the above, i shall try updating the display locally if possible. Hope to get this working sooner, AJ "
  6. Hello everyone, i am building an MCP for the Quality Wings B-757-200 using Mobi-flight. As of now everything seems to be working fine except the MCP altitude value on the 7-Segment dislay When i rotate the encoder the altitude in the Simulator MCP window , Increases & Decreases but the Altitude display on the 7-Segment does not keep up and get lags behind, and when i rotate it anticlockwise the 7 segment altitude display goes to zero. when ever i hit the FLCH or VS button the altitude is Sync again, its just not stable offset used for the output is - 0x07D4 , 4bytes , Integer, transform - $*3.28084/65536 FSUIPC - 4.975A ,19th may 2020 - Registered version A friend on the mobiflight forum advised me to use the Lua and write a code to read the value and display it on the 7-Segment. but since i have no coding background i am finding it a bit difficult to wrap my head around the script. i did a lot of googling and found some code and modified it, but am not sure if its correct and how to properly use and execute it. The code to read the LVAR - file name is " b75200.lua " first = true while true do if first then initialALTVal = ipc.readLvar("L:alt_sel_num") ipc.writeUD(0x66C0, initialALTVal) first = false else currentALTVal = ipc.readUD(0x66C0) ipc.writeLvar("L:alt_sel_num", currentALTVal) end end The code to execute the script every-time the aircraft is started up - ipcready.lua if ipc.readSTR(0x3D00, 10) == "QualityWings 757-200F QW House Livery RR" then ipc.runlua("Lua:b75200") end Both the files are in the Modules folder along with FSUIPC request you to kindly guide me, in case the code is appropriate, any posts / info on how to utilize the code effectively and execute it. Thanks a lot AJ
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.