PDA

View Full Version : Embraer 175



berkayeraydin
02-05-2017, 01:20 PM
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 the questions.
I can use FSUIPC for inputs(rotarys , buttons ...) Mouse macro is working very good for all buttons in embraer. And i 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. Again sorry for my English :roll:

berkayeraydin
02-06-2017, 08:54 AM
i tried interrogate. But it did not work.
(https://youtu.be/9usH5wpr6Zs)

_alioth_
02-06-2017, 12:30 PM
Hi.

Im using link2fs - arduino - a2a plane.

Lots of variables are custom and they are not listed in link2fs.
Link2fs only use the standard variables listed in FSUIPC.

There are two ways to do what you are asking for:

1.- If you need to switch on a led when you turn off the APU, you can program this with Arduino (or other microcontroller). You know the conditions needed to switch on the led. So, you can read those (standard) variables. And depending its values, switch on de led with arduino... or other microcontroller.

2.- You can read the custom variable. You must find it first. I use "Linda" program to find and read those custom variables. Later... you can program an script (lua script in modules folder) to write this variable in a custom offset which can be read in the expert section of link2fs.

Im using both ways, depending many things.

berkayeraydin
02-06-2017, 03:56 PM
Thank you i have tried. I am happy now,it can read all switches yeeey .. wait .. what is that ! ... Watch the video :( That is like a joke It reading everything, except what i needed. :shock:



https://youtu.be/GzlOJnYX4HA

_alioth_
02-06-2017, 04:39 PM
Try using Link2fs->Expert->FSUIPC(1) and use one of this offsets:

0B51 , docs sais it is APU generator switch
0B52 , it seems to be APU generator active flag

berkayeraydin
02-06-2017, 05:10 PM
It is not reading. An interesting plane. Forcing me to build 737 or cessna :D Anyway, it does not matter. I can do this manually. if i press that button led will glow. Simple methods .. Thank you for the help :grin:

berkayeraydin
02-07-2017, 08:06 AM
Hi.


Later... you can program an script (lua script in modules folder) to write this variable in a custom offset which can be read in the expert section of link2fs.

Im using both ways, depending many things.

Hi again :) How can write a lvar to offset ? I created i file name is "test.lua" and i write this :



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

berkayeraydin
02-07-2017, 08:12 AM
Hi.


Later... you can program an script (lua script in modules folder) to write this variable in a custom offset which can be read in the expert section of link2fs.

Im using both ways, depending many things.

Hi again http://www.mycockpit.org/forums/images/smilies/icon_smile.gif How can write a lvar to offset ? I created a file in modules folder. name is "test.lua" and i write this :



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

berkayeraydin
03-05-2017, 06:51 AM
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 :



-- 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")