Welcome to Cockpitbuilders.com. Please login or sign up.

May 14, 2024, 12:06:16 AM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
721 Guests, 0 Users
Members
Stats
  • Total Posts: 59,641
  • Total Topics: 7,853
  • Online today: 714
  • Online ever: 831
  • (May 03, 2024, 12:39:25 PM)
Users Online
Users: 0
Guests: 721
Total: 721

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

Embraer 175 Project

Started by berkayeraydin, February 05, 2017, 03:59:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

berkayeraydin

Hello,i'm new here. First of all i must say my English is not very good. I am sory for that.

I want to build an embraer 175 cockpit. I use Prepar3D and feelthere Embraer 175. Before start the project i need to solve theese questions.
I can use FSUIPC for inputs(rotarys , buttons ...) Mouse macro is working very good for all buttons in embraer. And i can use Link2fs for read values. But link2fs can not read all values of embraer An example, overhead panel;a led must glow when i turn off apu generator, but link2fs can not read this. or master warning caution leds.. Maybe i can read from EJets.gau module ? When fsuipc saving macros i see that module name. How can i read these values?  Again sorry for my English, and thanks :)

Trevor Hale

Hi Berkay


Welcome to the group. No worries about your English. We will figure out what your asking.


Do a google search for "FS interrogate " it's an FSUIPC program that is downloaded in the SDK I think. What it allows you to do is scan all fsuipc offsets available. You scan once. Flip your generator switch scan again and turn it off again and do a third scan.


If you are lucky it will tell you the offset that changed and the values it changed to. I suspect something like the generator will use the default FS Generator offset.


If you do this you are in luck and you can use an arduino or other output card to activate an led.


You will need to figure out how to use FS interrogate but it isn't rocket science.


Trev
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

berkayeraydin

#2
Thank you :) , i tried your says. But it did not work. I recorded a video, maybe i am doing something wrong. And i tried nav light it is work but its already known by program you can see at the and of video. :(   Do you know another way ?

https://youtu.be/9usH5wpr6Zs

Trevor Hale

#3
Hi there..

Thinnk you should try again LOL

You Changed it to unknown Variables..  I would have left that at default. Because it could be a known Offset that it changes.    Then once you go into "Interrogate mode" You need to do a "Ctrl A" To select all the offsets.

When you ran it you only had the top one selected so it didn't know what to scan. (From what I remember of the software)

I don't have interrogate installed right now otherwise I would test what your doing.  I am thinking you need to try again.  Don't set the tolerance to 50% though, or you will find everything you don't want to find.

Leave these settings at default.


I can't read what is being typed in the FS Window in green though, but I don't think thats important.

It is possible that you won't be able to identify this, and if that is the case, your going to be out of luck. This Aircraft you are using was not designed to do what your doing with it, unlike "Project Magenta, SimA, ProSim, and others"

With that being said, there is always another way to skin the cat.

1. Install a switch and have the switch trigger a relay, (One output of the relay goes to an input card and uses a key to mouse pointer input clicking on the button on the overhead) (FUSIPC)

2. The second output of the relay will actually latch back onto the relay itself to hold the relay closed, and
3. You take the third output of the relay and tie it to ground through an led and a resistor.

This will solve your issue, but is very cumbersome.

Trev
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

berkayeraydin

Ups ::)  hahah  Okey i will select all and try again  ;D

berkayeraydin

The news is not good.  I have tried, but not work.  And i found a program name is linda. I think it will solve the problems, maybe ..  It can read all switches of embraer. I am happy now, but ... but .. Watch the video  :'(  That is like a joke ! It reading everything, except what i needed.  :o



https://youtu.be/GzlOJnYX4HA

Trevor Hale

Lol. Linda is a good program. But not something I have tried to play with. Looks neat though.


Short of writing your own gauges or speaking with the developers. I am out of suggestions for ya bud. But I tried.


Many people tried with the PMDG737 to do the same thing. And they realized quickly there is a difference between a 60$ aircraft and a 1500$ avionics package.


Good luck my friend.
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

berkayeraydin

#7
Forcing me to build 737 or cessna   ;D Anyway, it does not matter. As you say, i can do this manually. if i press that button led will glow with relays. Thank you for the help   :) I will share photos and videos, if i can :)

berkayeraydin


Hi again  :D How can write a lvar to an offset ? I created a file in modules folder. name is "test.lua" and i write this :



Quote
function EmbRev1Knob(offset, value)
if (value == 1) then ipc.writeLvar("EmbRev1Knob", 1)
else ipc.writeLvar("EmbRev1Knob", 0)
end
end


event.offset("66C0","UB","EmbRev1Knob")

But how i can use it ? I want to change switches positions from arduino

Trevor Hale

Quote from: berkayeraydin on February 07, 2017, 02:58:52 AM

Hi again  :D How can write a lvar to an offset ? I created a file in modules folder. name is "test.lua" and i write this :



Quote
function EmbRev1Knob(offset, value)
if (value == 1) then ipc.writeLvar("EmbRev1Knob", 1)
else ipc.writeLvar("EmbRev1Knob", 0)
end
end


event.offset("66C0","UB","EmbRev1Knob")

But how i can use it ? I want to change switches positions from arduino

Here is what I do......

My LUA code talks to the Arduino through the serial Port (Obviously)

I think your issue is with the "UB"  Should it not be a "UD"?

ie :

Quote
event.offset(0x07BC, "UD", "call_offset") -- master ap


I have attached my Lua for your reference.

Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

berkayeraydin

Thank you, I will examine. And i don't know what is "UD" or "UB". I found this code on internet

Quotefunction Lights_Taxi(offset, value)
   if (value == 1) then ipc.writeLvar("OHD_EXT_LIGHTS_L_TAXI_SW", 1)
   else ipc.writeLvar("OHD_EXT_LIGHTS_L_TAXI_SW", 0)
   end
end

function Lights_Landing(offset, value)
   if (value == 1) then
         ipc.writeLvar("OHD_EXT_LIGHTS_L_FLARE_SW", 1)
         ipc.writeLvar("OHD_EXT_LIGHTS_L_APPR_SW", 1)
   else    ipc.writeLvar("OHD_EXT_LIGHTS_L_FLARE_SW", 0)
         ipc.writeLvar("OHD_EXT_LIGHTS_L_APPR_SW", 0)
   end
end

event.offset("66C0","UB","Lights_Taxi")
event.offset("66C2","UB","Lights_Landing")


And i edited.

Trevor Hale

UD = Unsigned Double word or (Fsuipc Length of 2)

SD = Signed double word meaning could be a positive number or a negative number

UW = Unsigned Word

SW = Signed Word, etc...

here is a great lua resource to help you get going...

http://www.anadrac.com/FSUIPC-Lua-Tutorial/

Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

berkayeraydin

#12
Hi again :) Now i try to communicate lua script and arduino. With a2a 182. i am trying to change mixture lever position but this does not anything. I sending value from arduino between 0-100. Here lua script :

Quote-- Open Seial Port and connect to Arduino
speed = 115200
handshake = 0
serial_wait = 100
inited = 0
states = {}
dev = com.open("COM6", speed, handshake) -- Change Port Number for your Arduino

if dev == 0 then
    ipc.display("Could not open device port")
    ipc.exit()
end

-- Finish Serial Connect

function Eng1_MixtureManualLever(offset, value)
    gelen = com.read(dev,n)
   ipc.writeLvar("Eng1_MixtureManualLever", gelen)
end


event.offset("66C0","UB","Eng1_MixtureManualLever")


Trevor Hale

#13
LOL First of all your using an OFFSET that is not assigned to anything.

You should be Using

0x3AF0 for Engine 1  an the Length is 8 = "DBL"

event.offset(0x3AF0,"DBL","Eng1_MixtureManualLever")

Trev

The next problem you have is the fact that aircraft may not use that Offset,  To double check if they use one.. (Which I doubt they will)

Run FSInterrogate.  Do the 3 scan identifyer.  Scan one Mixture null, Scan 2 use your mouse and move mixture full" Scan 3 Mixture Null, and see what fsuipc reports.

Good luck
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate