Jump to content
The simFlight Network Forums

odrezet77

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by odrezet77

  1. So,

    I've tried to this FSUIPC_WASM.ini in some locations, as stated in your post and the documentation :

    FSUIPC_WASM.ini 

    [General]
    ; LogLevel: Disable, Info, Debug, Trace, Enable
    LogLevel=Debug
    ; LogType: File, Console, Both
    LogType=Both
    ; StartEventNo: this must be the same as defined in the FSUIPC7.ini file
    StartEventNo=0x1FFF0
    ; LvarUpdateFrequency: frequency to update internal lvar values list and set in CDA
    ; Accept values: Off, 6Hz, Second, Frame, VisualFrame. If using 'Off', update timer must be active in a client
    LvarUpdateFrequency=6Hz
    LvarScanDelay=45

    Locations :

    C:\Users\PCMSFS\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages\fsuipc-lvar-module : Same behavior

    C:\Users\PCMSFS\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages\fsuipc-lvar-module\Work : Same behavior

    D:\MSFS\Community\fsuipc-lvar-module : it seems to be ok ! 😊

    I will make further tests. Thank you !

     

    Edit : I have a Deluxe Premium DVD Edition. If  it can change something.

     

  2. John, 

    I do confirm  that i have to click reload and list lvars to see the needed ones Then, all is working fine.

    It's same behavior if FSUIPC is launched by (MSFS) or if FSUIPC is launched after MSFS.

    It seems to be ok if FSUIPC is launched after MSFS.

    Here's the Wapi section of Fsuipc ini file :

    [WAPI]
    EnableWAPI=Yes
    LogSeparately=No
    LvarScanDelay=60

    The LvarScanDelay does not change anything to this behavior.

    You will find my fsuipc.log in attachments.

    Oliver

    FSUIPC7.log

  3. Hello,

    I want to use some of my DIY controls (like flaps lever)

    It's working fine with stock aircrafts, lua, sioc and fsuipc offsets. However, it doesn't work with JustFlight's aircraft, as they use Lvars.

    With Wasm module configured and enabled, i can list and identify lvars needed. But each time i launch MSFS, i have to run a flight, then launch fsuipc, go to add ons, Wasm and list LVARs. Then, lvars can be used, and it works.

    If these actions are not done, then my lua script won't work as needed lvars are not there.

    So, is there a way to use an lua script to list lvars and/or use wasm module ?

    Thanks for your help,

    Kind regards.

    Oliver.

  4. Good morning ! 

    I'm a registerd user of FSUIPC 7 (7.0.6) for MSFS and i've jsut bought a new aircraft : Justflight Piper Arrow 3.

    It doesn't work with my Saïtek panels (a lot of buttons are not working) so I wanted to check if lvars are used by this aircraft, but i can't find the log lua file you were providing before.

    I have no more access to my old computer (P3Dv5) to get it back.

    Is there a way to get this file ?

    Have a great day and take care !

    Oliver.

     

  5. Well, I should have reread my post before posting. 

    GearStateVal should be 0 or 49149 if everything is ok.  All gears down or up.

    I just want to manage my PDMG gears with my saitek switch panel. 

    3 Lights are green if all gear are down and ok.  3 Lights are off when all gears are up and ok.  3 lights are red when gears are operating.

    If a gear is not fully up or down, its lights is red.

    My whole code works fine when comparison is ok (when Gear_Down_Up is called with a "manual" value and not a result of 3 ipc.read values)

    Oliver.

    function Gear_Lever()
    	gear_nose=ipc.readUD(0x0BEC)
    	gear_left=ipc.readUD(0x0BF0)
    	gear_right=ipc.readUD(0x0BF4)
    	GearStateVal = gear_nose + gear_left + gear_right
    	
    	Gear_Down_Up(GearStateVal)
    end
    	
    
    function Gear_Down_Up(GearStateVal)    
    	-- PDMG EVT_GEAR_LEVER (69632 + 768)
        testVar = ipc.readUD(0x3360)
    	dev = ipc.get("dev")
    	wrf = ipc.get("wrf")
    	
        if logic.And(testVar,0x80000) ~= 0  then
    		gear_nose=ipc.readUD(0x0BEC)
    		gear_left=ipc.readUD(0x0BF0)
    		gear_right=ipc.readUD(0x0BF4)
    		GearState = gear_nose + gear_left + gear_right			
    		ipc.control(66080,16383)	-- OFFSET FSX OK
    				
    		while GearState ~= GearStateVal do
    						
    			gear_nose=ipc.readUD(0x0BEC)
    			gear_left=ipc.readUD(0x0BF0)
    			gear_right=ipc.readUD(0x0BF4)
    		    GearState = gear_nose + gear_left + gear_right	
    			ipc.display("RUN --> N : " .. gear_nose .." L : " .. gear_left .. " R : " .. gear_right .. "\n"
    					   .. "        GearStateVal : " .. GearStateVal) --.. " / GearState : " .. state)			
    			s = string.char(0,56)
    			com.writefeature (dev, s, wrf)
    			
    		end
    		
    		
    		if gear_nose ~= 16383  then
    			r1=1
    			g1=0
    		else
    			r1=0
    			g1=1
    		end
    				
    		if gear_left ~= 16383  then 
    			r2=1
    			g2=0
    		else
    			r2=0
    			g2=1
    		end
    				
    		if gear_right ~= 16383  then 
    			r3=1
    			g3=0
    		else
    			r3=0
    			g3=1
    		end
    		
    				
    		-- Concaténation des valeurs dans une chaîne
    		val = "" .. r1 .. ""  .. r2 .. ""  .. r3 .. "" .. "" .. g1 .. ""  .. g2 .. ""  .. g3 
    		-- Conversion en binaire de la chaîne val convertie en nombre
    		valBIN = (tonumber(val,2))
    		s = string.char(0, valBIN)
    		com.writefeature (dev, s, wrf)
    
    	else
    
    		ipc.control(66079,0)		-- OFFSET FSX OK
    				
    		while GearState ~= GearStateVal do
    			
    			gear_nose=ipc.readUW(0x0BEC)
    			gear_left=ipc.readUW(0x0BF4)
    			gear_right=ipc.readUW(0x0BF0)
    			GearState=gear_nose + gear_left + gear_right
    			ipc.display("RUN --> N : " .. gear_nose .." L : " .. gear_left .. " R : " .. gear_right .. "\n"
    					   .. "        GearStateVal : " .. GearStateVal) -- .. " / GearState : " .. state)
    			s = string.char(0,56)
    			com.writefeature (dev, s, wrf)
    		end
    		
    		if gear_nose ~= 0x00000000 then 
    			r1=1
    			g1=0
    		else
    			r1=0
    			g1=1
    		end
    		
    		if gear_left ~= 0x00000000 then 
    			r2=1
    			g2=0
    		else
    			r2=0
    			g2=1
    		end
    				
    		if gear_right ~= 0x00000000 then 
    			r3=1
    			g3=0
    		else
    			r3=0
    			g3=1
    		end
    		
    		-- Concaténation des valeurs dans une chaîne
    		val = "" .. r1 .. ""  .. r2 .. ""  .. r3 .. "" .. "" .. g1 .. ""  .. g2 .. ""  .. g3 
    		-- Conversion en binaire de la chaîne val convertie en nombre
    		valBIN = (tonumber(val,2))
    		if valBIN == 07 then
    			s = string.char(0, 00)
    		 else
    			s = string.char(0, valBIN)
    		end	
    	
    		com.writefeature (dev, s, wrf)
    	end
    end        

     

  6. Hi,

    The code below doesn't work, and i don't understand why. GearStateVal value is send to Gearr_Down_Up function, and is compared to a var called GearState. Values of both vaqrs are shown with ipc.display, and are right. So why the comparison will never work ? If values of 16383 or 0 are sent, the comparison work and it will work. If vGearValState is sent, with values of 16383 or 0, it will not work ... 

    Why ? 0 is 0 ... and 16383 is 16383 ...

    Thank you for your help ...

     

    Regards,

    Oliver

    function Gear_Lever()
    	gear_nose=ipc.readUD(0x0BEC)
    	gear_left=ipc.readUD(0x0BF0)
    	gear_right=ipc.readUD(0x0BF4)
    	GearStateVal = gear_nose + gear_left + gear_right
    	
    	Gear_Down_Up(GearStateVal)
    end
    	
    
    function Gear_Down_Up(GearStateVal)    
        -- Gear_Lever_DOWN bit : 2^19= 524288
    	-- PDMG EVT_GEAR_LEVER (69632 + 768)
        testVar = ipc.readUD(0x3360)
    	dev = ipc.get("dev")
    	wrf = ipc.get("wrf")
    	
        if logic.And(testVar,0x80000) ~= 0  then
    		gear_nose=ipc.readUD(0x0BEC)
    		gear_left=ipc.readUD(0x0BF0)
    		gear_right=ipc.readUD(0x0BF4)
    		GearState = gear_nose + gear_left + gear_right			
    		ipc.control(66080,16383)	-- OFFSET FSX OK
    				
    		while GearState ~= GearStateVal do
    						
    			gear_nose=ipc.readUD(0x0BEC)
    			gear_left=ipc.readUD(0x0BF0)
    			gear_right=ipc.readUD(0x0BF4)
    		    GearState = gear_nose + gear_left + gear_right	
    			ipc.display("RUN --> N : " .. gear_nose .." L : " .. gear_left .. " R : " .. gear_right .. "\n"
    					   .. "        GearStateVal : " .. GearStateVal) --.. " / GearState : " .. state)			
    			s = string.char(0,56)
    			com.writefeature (dev, s, wrf)
    			
    		end
    	end
    end	

     

  7. Hi,

    The code below doesn't work, and i don't understand why. GearStateVal value is send to Gearr_Down_Up function, and is compared to a var called GearState. Values of both vaqrs are shown with ipc.display, and are right. So why the comparison will never work ? If values of 16383 or 0 are sent, the comparison work and it will work. If vGearValState is sent, with values of 16383 or 0, it will not work ... 

    Why ? 0 is 0 ... and 16383 is 16383 ...

    Thank you for your help ...

     

    Regards,

    Oliver

    function Gear_Lever()
    	gear_nose=ipc.readUD(0x0BEC)
    	gear_left=ipc.readUD(0x0BF0)
    	gear_right=ipc.readUD(0x0BF4)
    	GearStateVal = gear_nose + gear_left + gear_right
    	
    	Gear_Down_Up(GearStateVal)
    end
    	
    
    function Gear_Down_Up(GearStateVal)    
        -- Gear_Lever_DOWN bit : 2^19= 524288
    	-- PDMG EVT_GEAR_LEVER (69632 + 768)
        testVar = ipc.readUD(0x3360)
    	dev = ipc.get("dev")
    	wrf = ipc.get("wrf")
    	
        if logic.And(testVar,0x80000) ~= 0  then
    		gear_nose=ipc.readUD(0x0BEC)
    		gear_left=ipc.readUD(0x0BF0)
    		gear_right=ipc.readUD(0x0BF4)
    		GearState = gear_nose + gear_left + gear_right			
    		ipc.control(66080,16383)	-- OFFSET FSX OK
    				
    		while GearState ~= GearStateVal do
    						
    			gear_nose=ipc.readUD(0x0BEC)
    			gear_left=ipc.readUD(0x0BF0)
    			gear_right=ipc.readUD(0x0BF4)
    		    GearState = gear_nose + gear_left + gear_right	
    			ipc.display("RUN --> N : " .. gear_nose .." L : " .. gear_left .. " R : " .. gear_right .. "\n"
    					   .. "        GearStateVal : " .. GearStateVal) --.. " / GearState : " .. state)			
    			s = string.char(0,56)
    			com.writefeature (dev, s, wrf)
    			
    		end
    	end
    end	

     

  8. Okay, it seems to be clear . 

     

    So, may your solution should work despite your answer ?

     

     

     

    You could have a small Lua file, run as part of an [Auto] section in the INI, to read the string, extract the number (presumably discarding the alpha characters?) converting it to binary, and placing the result in a user offset (in the range 66C0-66FF). You'd use the "event.offset" function to keep things updated automatically.
  9. Trying to play with tail numbers, I tried this :

     

    Read each offset from 313c to 3148 (those affected to ATC id) ...

     

    For this aircraft tail number (FSX cessna default) N760PL :

    I get these values :

    313c - 78 - N
    313d - 55 - 7
    313e - 54 - 6
    313f - 48 - 0
    3141 - 76 - P
    3142 - 48 - 0

    So, no matter the tail number : Offset 3142 is always 0 (zero) as a terminator ...

     

    I'm using FSUIPC  4.937 registered.

    Edit : Same behavior with 4.939.

  10. Hi,

     

    As I am discovering the use of Arduino boards, I would like to show the tail number of my Aircraft on a LCD display, connected to the Arduino board.

     

    The offset I need should be 0x313C. Using Link2FS to communicate with FSX/FSUIPC and Arduino, I get this value : 60710508774988 ... And I don't know how to handle this value to display a string ...

     

    I googled this for a long time and ... Still no idea ...

     

    May someone help me ?

     

    Oliver.

  11. I got it !   :razz:

     

    A very special thanks to Pat_59 And Dreambox ...  :cool:

     

    • In the "HID.LUA" file , add these two lines :

     

    ipc.set("dev",dev)
    ipc.set("wrfr",wrf)
     
    below this one :
     
    dev, rd, wrf, wr, init = com.openhid(Vendor, Product, Device, Report)
     
    This part of your file should be like this :
     

     

    -- opening HID device Saitek Switch panel
    Vendor = 0x06A3
    Product = 0x0D67
    Device = 0
    Report = 0
    dev, rd, wrf, wr, init = com.openhid(Vendor, Product, Device, Report)
    ipc.set("dev",dev)
    ipc.set("wrf",wrf)

     

    • In your "Radio.lua" file, add these lines to switch on green leds :

     

    dev = ipc.get("dev")

    wrf = ipc.get("wrf")
     
    s = string.char(0,07) -- 07 will light red leds
    com.writefeature (dev, s, wrf)

     

    • In your "Radio.lua" file, add these lines to switch on red leds :

     

    dev = ipc.get("dev")

    wrf = ipc.get("wrf")
     
    s = string.char(0,56) -- 56 will light red leds
    com.writefeature (dev, s, wrf)

     

    That's all ... Let's play !  :razz:

     

    Hope it will help ...

     

    Regards.

  12. Hi,

     

    I've found this topic about Saitek Switch Panel Leds :

     

    http://forum.simflight.com/topic/71786-programming-of-the-saitek-pro-flight-panels-with-fsuipc-and-lua/

     

    Indeed, i'm looking for explanations or samples about this command : 

     

    com.writefeature(dev, s, wrf)

     

    The goal of my request is to switch on (red or green) leds on Saitek Switch Panel.

     

    May someone help me ? 

     

    Best regards,

    Oliver.

  13. Pete,

     

    Thank you for your quick reply !

     

    Fsuipc was working fine for months ... 

     

    I've tried this : "NEW! With effect from version 4.85 of FSUIPC, a small DLL called FSUIPC4_Loader is supplied inside the main downloaded ZIP file. If you place this into the FS Modules folder and re-run the FSUIPC4 installer, then the Loader will be loaded by SimConnect instead of FSUIPC4 directly, and that Loader will load FSUIPC4 itself after a few seconds. This may help get over the SimConnect bug."

     

    Version 4.929 seems to work fne...

     

    I've tried this too : " Go to Internet Explorer. Select Tools -- Internet Options -- Content -Publishers -- Trusted Publishers, and make sure SimFlight GmbH is listed there. If not, right click on FSUIPC4.DLL, select Properties -- Digital Signature, select the certificate and click -- Details -- View -- Install Certificate. Click Next or OK all the way through. Then go back to Internet Explorer and find the Certificate in the Other Publishers list. Export it to a file, and go to the Trusted Publishers section again and Import it. "

     

    In "details" tab, i can't see an item like "digital signature" ... Maybe it was for older versions ?

×
×
  • 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.