Jump to content
The simFlight Network Forums

Federico

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Federico

  1. Hello John, No antivirus, also Windows defender is disabled. I tried to launch again the installer and it doesn't ask for the autostart component but steel the same. I saw that after accepted the terms condition and choosed the path, the installation begin with "error download xx xx.exe.xml" sorry but it too fast to read the exact name of the file it's trying to download, but it's the first thing the installer do. It is so strange, the first time I installed FSUIPC I had no problem. Maybe something in the registry to clean? Thanks
  2. Hello, I'm trying to reinstall FSUIPC7 after unwanted removing it, but when I run the installer I got this error inside the Event windows. Faulting application name: Install_FSUIPC7.exe, version: 0.0.0.0, time stamp: 0x5df6d605 Faulting module name: nsisXML.dll, version: 0.0.0.0, time stamp: 0x502443ee Exception code: 0xc0000005 Fault offset: 0x00001ebd Faulting process id: 0xdb0 Faulting application start time: 0x01d7014f768d26b9 Faulting application path: C:\Users\Federico\Downloads\Install_FSUIPC7\Install_FSUIPC7.exe Faulting module path: C:\Users\Federico\AppData\Local\Temp\nss3FCD.tmp\nsisXML.dll Report Id: 9a217f2e-1bbe-4d3e-820e-71a25f019f6c Faulting package full name: Faulting package-relative application ID: The directory C:\FSUIPC7 is created and the only file inside is the FSUIPC7.exe. I already tried to reinstall VC++ Redistr. , but nothing changed. Any suggestion? Thank you
  3. Thanks John I'm studying but it's a lot of things and the functions you described were not clear to understand. Now it's clear. Thanks so much.
  4. Thank you very much Roman, that's what I was looking for. I had a look at logic.And but maybe I'm new to this and didn't understand well. Thanks a lot
  5. Good morning, After 2 weeks programming my first diy panel I have some doubts. I've read and searched inside the FAQ and official documentation but it seems not explained or maybe I didn't look so well, so excuse me in case of repetition. 1) Is there a way to read the single bit? For example in the offset 0D0C I can set taxi lights with writeUB or setbitsUB but how can I read it's status? 2) Looping. I understood event.com and event.offset are a sort a silent looping activated only when "something" happens. In case I want to read for example every 2 seconds a set of variable, the event.timer is the best way? 3) I see in some topics minor release update for the 7 version. Where to find the latest? Thanks for your help.
  6. Hello, I found the problem. It was in the function declaration. I suppose to put another variable containing the COM handle inside the header, besides offset and value, but this was never read inside the function. After managed the com handle with ipc.put/get that worked for me. It seems function called by event cannot have parameters besides offset and value. So, event can be put all together at the end of the functions section. Thank you very much for your kindly effort, I'm going to open another topic for other doubts.
  7. Thanks John. It's not clear to me the profile code. For example, if I want to assign an auto section to my Asobo A320 in FS2020, [AUTO.xxx] which value xxx should have?
  8. Hello, first of all thank you very much Pete & John. I divided the script in 2 separate files and used the ipc.set/get to pass the com handle between them. This is the first script associated to button1 of the joystick, in the future I'd want to be executed automatically once the flight is loaded, have to understand how. For the moment I start it pressing the button only one time, it is responsible to OPEN the COM and monitoring the event.com in order to catch the rotary encoder changes of the autopilot altitude: Arduino_Com_Port = com.open("COM6", 115200, 0) if Arduino_Com_Port ~= 0 then ipc.log("Arduino Com Port Open: "..Arduino_Com_Port) ipc.set("arduinoCom", Arduino_Com_Port) else ipc.log("Could not open ARDUINO Com Port") ipc.exit() end function Arduino_Data(Arduino_Com_Port, datastring, length) if (string.find(datastring, "INC1000")) then -- Altitude up ipc.control(65892,0) end if (string.find(datastring, "DEC1000")) then -- Altitude dw ipc.control(65893,0) end end event.com(Arduino_Com_Port, 50,1, "Arduino_Data") -- Monitor the serial This is the second script, used to switch on the led on my arduino panel, associated to button2 of the joystick. It catch the event.offset of the taxi lights of A320 that has 3 position OFF/TAXI/T.O. function sendLightsStatus(offset,value) ipc.log("Taxi value: "..value) Arduino_Com_Port = ipc.get("arduinoCom") ipc.log("Arduino COM id: "..Arduino_Com_Port) if (value==32) then n = com.write(Arduino_Com_Port, "TAXIOFF") end if (value==40) then n = com.write(Arduino_Com_Port, "TAXION") end if (value==36) then n = com.write(Arduino_Com_Port, "TAXITO") end ipc.log("sent "..n.." bytes") end event.offset("0D0C", "UB", "sendLightsStatus") I confirm with this configuration all is working. I tried to merge all the in one script and this time works!!!! It seems the problem was the 2 event.com consecutive lines: -- Function block .......... -- event.com(Arduino_Com_Port, 50,1, "Arduino_Data") -- Monitor the serial event.offset("0D0C", "UB", "sendLightsStatus") Putting the "senLightsStatus" function just after event.com and before the event.offset, works for me. Thanks a lot for your help.
  9. Hello John, I changed all the ipc.display to ipc.log, but the problem is the com.write does not work when the event.com is enabled. For example if I comment the event.com line, then when I change thaxi lights inside the simulator the string is correctly passed to arduino. Thank you.
  10. Hello, I'm trying to make my first panel, starting from basic implementation, Arduino, 1 rotary encoder, 1 led. I associated this LUA script to one of my Joystick button, that I press only one time, once "ready to fly" (FS2020). COM port correctly open and function Arduino_Data correctly receive values and autopilot altitude increase or decrease correctly. What I want to try, is, changing the taxi lights directly from inside the simulator, send the status to the Arduino and switch on or off a led. To do this I used the offset and the function sendLightsStatus, now only for practice I always send the TAXION string to arduino, it's only an exercise to understand. When I switch the taxi lights inside FS2020, the offset is correctly taken and the function is executed, but no bytes are sent, due the COM port seems to be busy by the event.com needed to monitor the inputs arriving from arduino. How can I solve? I'm a bit new to LUA and FSUIPC scripting, but not in programming in general. Thank you Arduino_Com_Port = com.open("COM6", 115200, 0) if Arduino_Com_Port ~= 0 then ipc.display("Arduino Com Port Open",5) else ipc.display("Could not open ARDUINO Com Port") ipc.exit() end function Arduino_Data(Arduino_Com_Port, datastring, length) if (string.find(datastring, "INC1000")) then -- Altitude up ipc.control(65892,0) end if (string.find(datastring, "DEC1000")) then -- Altitude dw ipc.control(65893,0) end end function sendLightsStatus(offset, value, Arduino_Com_Port) n = com.write(Arduino_Com_Port, "TAXION") ipc.display("Sent: "..n) end event.com(Arduino_Com_Port, 50,1, "Arduino_Data") -- Monitor the serial event.offset("0D0C", "UB", "sendLightsStatus") -- Change of taxi lights
×
×
  • 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.