Jump to content
The simFlight Network Forums

DEN19

Members
  • Posts

    102
  • Joined

  • Last visited

Posts posted by DEN19

  1. I am trying to run  my instrument prog, GAPanel, from a button screen button on my slave pc.  I can get it to run using the line

     

    RunKey1="C:\Program Files (x86)\GAPanel\GAPanel.exe"

    This will open the prog and loads the default panel, which has been satisfactory up to now whilst I only used one panel.

     

    However I then need to access the progs stored files to open a different panel- I have 3 different panels depending on which aircraft I fly.  I can get them to run by opening Widows explorer and double clicking on the various entries (or right click and Open) but I can't get them to run using a RunKey command

     

    RunKey4="C:\Program Files (x86)\GAPanel\Panels\Extra 300.pnl"

     

    Wideclient give me  a "couldn't run" message with error=193.

     

    After Googling this error it seems to mean a Windows error as Extra 300.pnl is not is not a valid Win32 application.

     

    Is there any way I can cause these 3 different panels top be loaded by choice from a button screen key without having to get the mouse out again?

     

  2. I have 2 Saitek TQs in my simpit. The first 2 axes on the first TQ are behaving strangely in FSX(FSUIPC 4.859d).

    The Windows calibration tool(Win7-64 bit) shows them behaving normally, a 50% movement of the axis produces a 50% movement in the game controller window, 75% gives 75% and so on.

    However in FSUIPC the calibration does not follow this profile. A 99% movement of the axis stick causes the calibration in FSUIP to move fromm-16384 to 0, the last 1% movement of the axis causes FSUIPC caplibration togo from0 to+16384. The 3rd axis on that TQ behaves normally, as do other 3 on the 2nd TQ. This applies to any profile I try to use.

    I think this is caused by me calibrating wrongly somewhere so I deleted the axis calibrations in the .ini file and redid them today. There is no change in the response.

    Cleary I have overlooked something or done somthing wrong but cannot find it. Below is the (I hope!) relevant sections of the ini file for single engine profile but thebehavoir also occurs in the twin ingine profile as well.

    Can you please tell me what I have done wrong!!

    Thanks


    [JoyNames]
    AutoAssignLetters=Yes

    A=CH PRO PEDALS USB

    B=CH FLIGHT SIM YOKE USB
    C=Saitek Pro Flight Throttle Quadrant
    D=Saitek Pro Flight Throttle Quadrant
    E=BU0836X Interface
    0=Saitek Pro Flight Throttle Quadrant
    0.GUID={EB167160-31F5-11E0-8005-444553540000}
    2=CH PRO PEDALS USB
    2.GUID={EB164A50-31F5-11E0-8003-444553540000}
    4=BU0836X Interface
    4.GUID={EB16E690-31F5-11E0-800C-444553540000}
    1=CH FLIGHT SIM YOKE USB
    1.GUID={EB164A50-31F5-11E0-8004-444553540000}
    3=Saitek Pro Flight Throttle Quadrant
    3.GUID={EB167160-31F5-11E0-8006-444553540000}
    F=<< MISSING JOYSTICK >>
    [JoystickCalibration]
    AllowSuppressForPFCquad=Yes
    ExcludeThrottleSet=No
    ExcludeMixtureSet=Yes
    ExcludePropPitchSet=Yes
    SepRevsJetsOnly=No
    ApplyHeloTrim=Both
    FlapsSetControl=0
    FlapDetents=No
    ReverserControl=66292
    Reverser1Control=66422
    Reverser2Control=66425
    Reverser3Control=66428
    Reverser4Control=66431
    MaxThrottleForReverser=256
    AileronTrimControl=66731
    RudderTrimControl=66732
    CowlFlaps1Control=66162
    CowlFlaps2Control=66163
    CowlFlaps3Control=66164
    CowlFlaps4Control=66165
    SteeringTillerControl=0
    MaxSteerSpeed=60
    UseAxisControlsForNRZ=No
    ElevatorTrim=-16380,-64,-64,16380/8
    Aileron Trim=-16380,-488,230,16380
    Rudder=-16380,0,0,16380
    Rudder Trim=-16380,-262,0,16380
    LeftBrake=-16380,16380/16
    RightBrake=-16380,16380/16
    SlopeAileron Trim=-6
    SlopeRudder Trim=-6
    Aileron=-16380,-1430,3200,16380
    Elevator=-16380,-1944,4543,15695
    Throttle=-16380,16380

    [Axes]
    1=BX,256,D,1,0,0,0
    2=BY,256,D,2,0,0,0
    3=AX,256,F,66387,0,0,0
    4=AY,256,F,66388,0,0,0
    5=AZ,256,D,3,0,0,0
    9=EX,256,D,28,0,0,0
    10=EY,256,D,27,0,0,0
    11=EZ,256,D,21,0,0,0
    12=EU,256,D,4,0,0,0

    [Profile.Single engine piston]
    1=Cessna Skyhawk 172SP Paint2
    2=Cessna Skyhawk 172SP Paint3
    3=Cessna Skyhawk 172SP Paint1
    4=SIAI-Marchetti SF.260 Left G-AERO
    5=SIAI-Marchetti SF.260 Left White
    6=Commercial Level Simulations -- Piper PA-28R-200 Arrow II black
    7=Cessna Grand Caravan Paint2
    8=Commercial Level Simulations -- Piper PA-28R-200 Arrow II Red
    9=Chipmunk
    10=Commercial Level Simulations -- Piper PA-28R-200 Arrow II grey
    11=Mooney Bravo Retro
    12=Auster J1 Autocrat G-AGTO
    13=Hurricaneiv
    14=Commercial Level Simulations -- Piper PA-28R-200 Arrow II Light Blue
    15=Beech_p35
    16=PT-19
    17=CIX Chipmunk CHIP4
    18=DH82A Cix VFR Club G-BRSJ
    19=CIX Chipmunk CHIP6
    20=CIX Chipmunk CHIP1
    21=Beech_p35b
    22=Cessna Skyhawk 172SP Paint4
    23=Auster J1 Autocrat G-JAYI
    24=Beech_p35b
    25=CIX Chipmunk CHIP4
    26=AeropraktFoxbat.1
    [Axes.Single engine piston]
    0=CX,256,D,4,0,0,0
    1=CY,256,D,5,0,0,0
    2=CZ,256,D,6,0,0,0
    3=BX,256,D,1,0,0,0
    4=BY,256,D,2,0,0,0
    5=AX,256,F,66387,0,0,0
    6=AY,256,F,66388,0,0,0
    7=AZ,256,D,3,0,0,0
    8=EX,256,F,66732,0,0,0
    9=EY,256,D,27,0,0,0
    10=EZ,256,D,21,0,0,0
    [JoystickCalibration.Single engine piston]
    AllowSuppressForPFCquad=Yes
    ExcludeThrottleSet=No
    ExcludeMixtureSet=No
    ExcludePropPitchSet=Yes
    SepRevsJetsOnly=No
    ApplyHeloTrim=Both
    UseAxisControlsForNRZ=No
    FlapsSetControl=0
    FlapDetents=No
    ReverserControl=66292
    Reverser1Control=66422
    Reverser2Control=66425
    Reverser3Control=66428
    Reverser4Control=66431
    MaxThrottleForReverser=256
    AileronTrimControl=66731
    RudderTrimControl=66732
    CowlFlaps1Control=66162
    CowlFlaps2Control=66163
    CowlFlaps3Control=66164
    CowlFlaps4Control=66165
    SteeringTillerControl=0
    MaxSteerSpeed=60
    Aileron Trim=-16380,-512,512,16380
    Rudder Trim=-16380,-2123,1281,16380/8
    ElevatorTrim=-16380,-512,512,16380
    Rudder=-16380,-774,774,16380/8
    LeftBrake=-16380,16380/16
    RightBrake=-16380,16380/16
    SlopeLeftBrake=15
    SlopeRightBrake=15
    Aileron=-16380,-3901,4992,16380/8
    Elevator=-16380,-1666,4406,16380/8
    SlopeRudder Trim=6
    Throttle=-16380,-258
    PropPitch1=-16384,0,0,0/32
    PropPitch=-16380,-323
    Mixture=-16380,16380
    [/CODE]

  3. There are lots of examples, those supplied in the package installed for you in the FSUIPC Documents folder, and those supplied by others in the User Contributions subforum

    Yes I know, I read through these during my attempts over the weekend.

    So why not simply ask me to do it for you? That's what you want, isn't it?

    I thought I already did in an earlier post. See

    I would very much appreciate it if you would show me how to do it, with as short explanation so I can learn for the future- if you can spare the time
    You don't really want to do anything for yourself?

    Yes I do- that is why I asked you to explain things to me. See above.

    Now, don't you think you can do others yourself?

    I hope so, I'll certainly try.

    Regards and thanks

    Den

  4. All you have said above just bears out what I said that I do not have any idea about how to write the coding I need to get a window to display the OAT for me. I was doubtful about including the code because it was clear to me that it was a load of old rubbish. That is why I came asking for help.

    If you look at the FSUIPC log you will surely see the error message telling you this! If there's an error in the program it cannot compile, but the error message will tell you what the error is and even which line it is in! Have you never looked?

    No, because I didn't realise that the log would include any information that would help me. Another lesson learnt! W

    hether I would have understood what to do from the message there is debatable anyway. What comes easy to you as an expert is like Double Dutch to a novice like me.

    Please explain how you arrived at all this ...? If you are pulling lines at random from other things, then I think you should stop, and tthink a little instead. You can't make programs that work with random lines. Well, you can i suppose but the chances are extremely remote, the same as a roomful of monkeys with typewrites coming up with the works of Shakespeare! ;-)

    To be or not to xsdnmfskljnbfgb;jkv..... :razz:

    There's probably more chance of that than me getting the code I need correct, but I was hoping that, with some helpful advise I might learn how to get there. I've spent about 8 hours this weekend trying to understand what to do and how to do it- from the Lua handbook, which I found hardgoing, to Google, and got nowhere.

    That's why I need help.

    Den

  5. Ah, that's easy ... You have a line

    wnd.textcol(w2, 0x000)

    setting black when you set the background to green, but no equivalent

    wnd.textcol(w2, 0xfff)

    to set it white in the other case.

    I've just noticed, it was there but stuck on the end of the line above. Somehow the "return" had been lost and just needed re-inserting. See below.

    wnd.backcol(w2, 0xf00) --Set red when o wnd.textcol(w2, 0xfff) --

    The ipc.sleep did the job, the windows flash up on the main screen but immediately disappear.

    I am struggling though with the OAT coding. I'm a complete novice with coding of any sort and have spent several hours fruitlessly trying to get it to work. I only managed to get the other windows to work by blatantly plagiarising your notes above.

    What I have tried is shown below and it won't even get the window to display, never mind put any text in it. And as I don't have much hair left these days I can't afford to tear any of it out!

    w5 = wnd.open("OAT", WND_FIXED)

    ipc.sleep(5)

    ext.position("OAT", 43,5,12,2,1)

    wnd.font(w5, WND_ARIAL, 12.0, WND_BOLD)

    wnd.backcol(w5, 0xf00)

    wnd.textcol(w5, 0xfff)

    wnd.clear(w5)

    wnd.text(w, "OAT " .. temp .. "C")

    end

    --str = string.format("OAT %2.0fC", oat + 0.5)

    temp = ipc.readSW(0x0e8c)

    I would very much appreciate it if you would show me how to do it, with as short explanation so I can learn for the future- if you can spare the time.

    Thanks

    Den

  6. Sorry, I'm a little confused. You say:the windows are "supposed to appear on one screen, and they always do", but then go on to say sometimes they don't?

    Sorry for the confusion.

    They always appear on the correct screen but sometimes one appears on the home scree1 as well. Of couse there may be more than one super-imposed on each other, I never thought to check. I'll try the delay and report back.

    Ah, that's easy ... You have a line

    wnd.textcol(w2, 0x000)

    setting black when you set the background to green, but no equivalent

    wnd.textcol(w2, 0xfff)

    to set it white in the other case.

    Thanks Pete, don't know how I missed that, they were all just copied and pasted from the first entry- or so I thought.

    s

    If the OAT is read into a variable "oat" that would simply be something like:

    wnd.text(w, "OAT " .. oat .. "C")

    depending on whether "oat" was read as an integer or a floating point value. If it was floating point the more accurately youd use the 2string.format2 function,

    str = string.format("OAT %2.0fC", oat + 0.5)

    wnd.text(w, str)

    Thanks I'll try that tomorrow as well.

    Regards

    Den

  7. Pete

    Now managed to try out the setbtnstate in multiplayer. It's great to watch the toggles change colour as the other pilot swiches things on and off.

    I've noticed a couple of things to do with the following code, using the wnd command,which I can't fathom out- despite staring at it for too long ( something to do with trees and woods I think).

    w1 = wnd.open("Alt1", WND_FIXED)

    ext.position("Alt1", 43,1,6,2,1)

    wnd.font(w1, WND_ARIAL, 12.0, WND_BOLD) --Font, Size, Properties

    -- function to operate window colour

    function Alt1(off,val)

    if val ~= 1 then

    wnd.backcol(w1, 0xf00) --Set red when off

    wnd.textcol(w1, 0xfff)

    wnd.clear(w1)

    wnd.text(w1, "\n\n\tALT 1")

    else

    wnd.backcol(w1, 0x0f0) --Set Green when on

    wnd.textcol(w1, 0x000)

    wnd.clear(w1)

    wnd.text(w1, "\n\n\tALT 1")

    end

    end

    event.offset(0x3101, "UB", "Alt1")

    w2 = wnd.open("Alt2", WND_FIXED)

    ext.position("Alt2", 49,1,6,2,1)

    wnd.font(w2, WND_ARIAL, 12.0, WND_BOLD) --Font, Size, Properties

    -- function to operate window colour

    function Alt2(off,val)

    if val ~= 1 then

    wnd.backcol(w2, 0xf00) --Set red when o wnd.textcol(w2, 0xfff) --

    wnd.clear(w2)

    wnd.text(w2, "\n\n\tALT 2")

    else

    wnd.backcol(w2, 0x0f0) --Set Green when on

    wnd.textcol(w2, 0x000)

    wnd.clear(w2)

    wnd.text(w2, "\n\n\tALT 2")

    end

    end

    event.offset(0x3ab8, "DD", "Alt2")

    -----------------------------------------------------

    w3 = wnd.open("Alt3", WND_FIXED)

    ext.position("Alt3", 55,1,6,2,1)

    wnd.font(w3, WND_ARIAL, 12.0, WND_BOLD) --Font, Size, Properties

    -- function to operate window colour

    function Alt3(off,val)

    if val ~= 1 then

    wnd.backcol(w3, 0xf00) --Set red when paused

    wnd.textcol(w3, 0xfff)

    wnd.clear(w3)

    wnd.text(w3, "\n\n\tALT 3")

    else

    wnd.backcol(w3, 0x0f0) --Set Green when unpaused

    wnd.textcol(w3, 0x000)

    wnd.clear(w3)

    wnd.text(w3, "\n\n\tALT 3")

    end

    end

    event.offset(0x39f8, "DD", "Alt3")

    ------------------------------------------------------

    w4 = wnd.open("Alt4", WND_FIXED)

    ext.position("Alt4", 61,1,6,2,1)

    wnd.font(w4, WND_ARIAL, 12.0, WND_BOLD) --Font, Size, Properties

    -- function to operate window colour

    function Alt4(off,val)

    if val ~= 1 then

    wnd.backcol(w4, 0xf00) --Set red when paused

    wnd.textcol(w4, 0xfff)

    wnd.clear(w4)

    wnd.text(w4, "\n\n\tALT 4")

    else

    wnd.backcol(w4, 0x0f0) --Set Green when unpaused

    wnd.textcol(w4, 0x000)

    wnd.clear(w4)

    wnd.text(w4, "\n\n\tALT 4")

    end

    end

    event.offset(0x3938, "DD", "Alt4")

    ---------------------------------------------------

    1. The windows are supposed to appear on one screen, and they always do, but occasionally when Wideclient is started one witll appear on the main screen as well, and when it does it is huge, roughly a quarter of the screen in size with no text in it. It then won't disappear until Wideclient is closed.

    2. The windows text is supposed to be white or black, depending on the b/g colour, but in one of them (Alt2) it is always black- and I can't figure out what I've done wrong. Please help.

    Finally a question. Can the wnd command be used to display two types of text, one static and one based on data from FSX. What I'm thinking is an OAT gauge which reads the temp from fs and display it as "OAT nn ºC" with the nn read from fs and rest as static text?

    Regards

    Den

  8. Easy. use the Lua sound library.

    BTW the Lua updated documentation is now posted -- see the Download Links subforum

    Thanks- I knew you'd know the answer to that.

    w1 = wnd.open("Paused", WND_FIXED, 10,10,190,110)

    ext.position("Paused", 50,50,25,25,2)

    Question. If using the ext.position command do I still need to use the positional data (10,10,190,110) in the wnd.open command?

    Den

  9. Just got the time now to try it out with the new setbtnstate command. It works well and I think, along with the other 2 add-ins already tried that it gives me excellent flexibility to do all I originally wanted in terms of annunciators and, probably, a lot of other stuff I haven't even thought of yet but you probably have!.

    Or just use up some of the 288 buttons as indicators without assigning actions in FSUIPC

    The only problem with this is that my buttons are spread across several pages so , as you pointed out, I wouldn't necessarily see them "lighting up". That is why I will probably buid a bank of "idiot lights" as well.

    Again many thanks for your support.

    All it needs now is the ability to play an audible tone when on of the buttons changes state.

    (thinks to self) Now- how can I do that?...........

    Regards

    Den

  10. So using that you can tile the windows all over any screen you like without resorting to pixel counts!

    That certainly makes the arithmetic easier for setting it up.

    Yes, but currently that won't work with buttons on the button screen designated as "Toggle" (T or TN). They send a "press" and "release" on alternate presses, to simulate a proper toggle switch rather than a button, and change their own colour from their defalut to RED when the press is sent.

    What I am thinking is that instead of using toggles in the BS this new facility means that an ordinary button can be used and then use the Toggle facility in FSX with the feedback to the button colour for indication.

    For example I currently have one toggle on my BS for Master Battery- set to red when fsx loads up and which goes to green when I switch it on. That's fine as long as I do a C & D start, which I usually do, but it can be thrown out of sync. This is especially so if I am in shared cockpit mode on multiplayer, a position I find myself in more and more since I joined an on-line GA flying club (CIX VFR). In this position when the other person switches on the master switch mine remains red. With the new ipc.setbtncol addition I hope mine will turn to green when he switches it on.

    I'm sure there will be some instances where this cannot be applied though.

    I will actually have to use both the options you have come up with (the wnd and btn functions) because my cockpit has some functions controlled through the BS and some through real switches/pushbuttons via Bu0836X and KE72 interfaces. For the latter I will need some annunciators separate to the BS. Again this just reflects RW practices though.

    Den

  11. Windows uses x,y coordinates which extend from the top left corner of the leftmost topmost screen to the bottom right corner of the rightmost bottommost screen. The top left of the main windows screen is always 0, 0, so any left or above that will have negative values for coordinates.

    Damn-Should have thought of that myself!

    I'm adding another ButtonScreen function in Lua: to set the state of a Toggle button, so that I can make the Red or Green state indication reflect the relevant offset setting in FS.

    You set me thinking, I may not actually need a second instance of BS now to act as annunciators.

    Since each button can be controlled to visually reflect the status of the offset they effectively become self-indicating and always refect the condition of the parameter they are controlling. Just like self-illuminating switches in RW.

    I'm off to play again.

    Den

  12. One is just edit that example Lua i provided early. Change the wnd.open line to:

    w1 = wnd.open("Paused", WND_FIXED, 10,10,190,110)

    That's one way. Try it anyway, just to see.

    Tried this out now and it works OK. I can see that this can easily be used to produce a bank of annunciators for anything that info can be read from FSX offsets. Brilliant job.

    One question- the parameters for the positioning of the window, in this instance 10, 10, 190, 110, obviously refer to the position and size on the main screen on the desktop. How do I position it on another monitor on the same pc. I have 3 monitors on the desktop on my slave and want to position it on none of the others.

    I've not tried the BS one so fsr but will later today. I am assumimg that the action from the ipc.setbtncol( button, red, green, blue) command will only be actioned on the instance of Wideclient that the Lua file is stored with. Am I correct in that?

    Den

  13. This isn't really the sort of application I had in mind for this facility. It was more for text displays like checklists, logs, performance data, whatever. For this application you'd really not want title bars ad thick borders and so on.

    I'll look at putting Lua programmable features into the ButtonScreen facilities in any case.

    Having now tried it out see what you mean, it's not really right for the situation. I'll wait for the BS facility instead. I've already set up a second instance of Wideclient ready for use.

    Thanks again

    Den

  14. Pete

    Thanks for the quick reply.

    I can give you a little plua plug-in to do this, though, if you like. I'll be doing the documentation tomorrow, with luck.

    Yes I would like to try that.

    No, not at present. I could have a look at that. Currently the ButtonScreen is completely independent of other parts of Wideclient. If I implemented that it would have to be by the Button Number controlled by that position, so any change wouldn't be seen if the page with that button number wasn't currently shown.

    That would be my prefferred way. Can I run multiple instances of Wideclient on the slave pc or would that be impossible. If so, I could then have a one-page BS running on a second monitor on the slave which would just be for annunciators. I could then add a cut-out to the MIP for the display to show through.

    Of course, if the plug works OK then may not be be needed anyway.

    Den

  15. Pete

    I am looking to the poosibility of adding some annunciators to my slave pc for such things as generator lights, fuel cut-offs etc, which will show one colour if not running and anothern if running.

    to do this in the usual way with output cards and LEDs will be expensive so it set me thinking...

    Is this possible with a Lua script to read the required offset and display, say, a .jpeg image on the slave pc- although I am not sure how it could be done. I cannot see how the image will work just on the desktop, so it would require another program running to display it.

    Conversely could a Lua scrip be used to alter the state of a toggle in my button screen (again based on reading the value of an offset) from,say, red to green and vice versa. The toggle would not drive anything in FSX but only be used solely as a display for whatever info was needed to be displayed. This has the advantage that the text on the button would be programmable to anything needed.

    Or could Wideclient be made to do this itself?

    Or is there another way to do it?

    Your thoughts would be much appreciated.

    Den

  16. My right pedal has problems with releasing the differential brake when I release the pressure on the pedal. In fact I have to press my heel in order to release the right differential brake. This is also evident in the calibration window where the little cross only comes half way back when I release the right pedal. I wonder if a pair of CH Pro Pedals can be worn and not function correct any longer?

    I had this problem recently with my CH brake pedals sticking on the left foot and having to press down on the base to release it. I stripped the top cover off the foot pedal to expose the pots, which I then sprayed with electrical cleaner. This solved the sticking problem for me.

    Regards

    Den

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