Jump to content
The simFlight Network Forums

pilotjohn

Members
  • Posts

    377
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by pilotjohn

  1. 21 minutes ago, John Dowson said:

    I should say that this is what I see with my assignments using Axis Mixture1 Set.
    When I move the mixture in the VC, I see Mixture 1 Set events where:
        - < 164 is cut-off
        - between 164 and 16064 is low idle
        - >16064 is high idle

    So, switching to assigning with Send to FSUIPC as normal axis, and using Mixture Set and unchecking Exclude MIXTUREn_SET and with No reverse zone checked, I can then set the minimum axis position, Setting this to just below your detent should give cut-off in the range before your detent, and then low/high idle for the rest if the axis range. This is basically what you are trying to achieve, no?

    John

     

    I see what you're doing ... yes this works well. I set it up with a range and that worked also, but this is better, thanks.

    It's a little confusing, since I'm not sending it to calibration, but calibration is still being applied, right?

    The minimum calibration seems to be working fine.

    [Axes]
    RangeRepeatRate=10
    0=CX,16,D,3,0,0,0	-{ DIRECT: Rudder }-
    1=CU,16,D,7,0,0,0	-{ DIRECT: LeftBrake }-
    2=CV,16,D,8,0,0,0	-{ DIRECT: RightBrake }-
    3=EX,16,D,9,0,0,0	-{ DIRECT: Throttle1 }-
    4=EY,16,D,10,0,0,0	-{ DIRECT: Throttle2 }-
    5=EZ,16,D,17,0,0,0	-{ DIRECT: PropPitch1 }-
    6=EU,16,D,18,0,0,0	-{ DIRECT: PropPitch2 }-
    7=EV,16,F,65919,0,0,0	-{ TO SIM: MIXTURE1_SET }-
    8=DX,16,D,1,0,0,0	-{ DIRECT: Aileron }-
    9=DY,16,D,2,0,0,0	-{ DIRECT: Elevator }-
    
    [JoystickCalibration]
    AllowSuppressForPFCquad=Yes
    ExcludeThrottleSet=Yes
    ExcludeMixtureSet=No
    ExcludePropPitchSet=Yes
    SepRevsJetsOnly=No
    ApplyHeloTrim=No
    UseAxisControlsForNRZ=No
    MapThr12to34=Yes
    MapProp12to34=Yes
    MapMix12to34=Yes
    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
    RudderBlendLowest=1
    Aileron=-16256,-31,31,16256
    SlopeAileron=2
    Elevator=-16256,-15,15,16256
    SlopeElevator=1
    Rudder=-16256,-63,63,16256
    SlopeRudder=4
    LeftBrake=-16256,16256/16
    RightBrake=-16256,16256/16
    Throttle1=-15548,-2812,184,16169
    Throttle2=-16052,-2883,243,16195
    Mixture1=-10541,-10541,-9116,16079/32
    Mixture2=-16248,-11357,-9004,16159/32
    PropPitch1=-16184,-11037,-9196,15991
    PropPitch2=-16184,-11357,-9581,16015

    Here's the log:

    922062 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -256 (0xffffff00) AXIS_AILERONS_SET
       922125 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -249 (0xffffff07) AXIS_AILERONS_SET
       925000 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -256 (0xffffff00) AXIS_AILERONS_SET
       925031 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 16369 (0x00003ff1) MIXTURE1_SET
       925062 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 16241 (0x00003f71) MIXTURE1_SET
       925062 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 16068 (0x00003ec4) MIXTURE1_SET
       925093 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -249 (0xffffff07) AXIS_AILERONS_SET
       925093 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 15857 (0x00003df1) MIXTURE1_SET
       925109 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 15606 (0x00003cf6) MIXTURE1_SET
       925156 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 15310 (0x00003bce) MIXTURE1_SET
       925171 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 14970 (0x00003a7a) MIXTURE1_SET
       925203 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 14596 (0x00003904) MIXTURE1_SET
       925234 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 14207 (0x0000377f) MIXTURE1_SET
       925234 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 13808 (0x000035f0) MIXTURE1_SET
       925265 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 13400 (0x00003458) MIXTURE1_SET
       925281 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 12986 (0x000032ba) MIXTURE1_SET
       925312 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 12577 (0x00003121) MIXTURE1_SET
       925328 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -256 (0xffffff00) AXIS_AILERONS_SET
       925328 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 12174 (0x00002f8e) MIXTURE1_SET
       925375 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 11760 (0x00002df0) MIXTURE1_SET
       925390 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 11352 (0x00002c58) MIXTURE1_SET
       925421 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -249 (0xffffff07) AXIS_AILERONS_SET
       925421 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 10948 (0x00002ac4) MIXTURE1_SET
       925453 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 10549 (0x00002935) MIXTURE1_SET
       925468 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 10155 (0x000027ab) MIXTURE1_SET
       925500 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 9762 (0x00002622) MIXTURE1_SET
       925500 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 9373 (0x0000249d) MIXTURE1_SET
       925531 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 8979 (0x00002313) MIXTURE1_SET
       925546 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 8585 (0x00002189) MIXTURE1_SET
       925578 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 8196 (0x00002004) MIXTURE1_SET
       925593 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 7807 (0x00001e7f) MIXTURE1_SET
       925625 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 7423 (0x00001cff) MIXTURE1_SET
       925640 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -256 (0xffffff00) AXIS_AILERONS_SET
       925656 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 7039 (0x00001b7f) MIXTURE1_SET
       925671 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 6655 (0x000019ff) MIXTURE1_SET
       925703 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 6271 (0x0000187f) MIXTURE1_SET
       925734 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= -249 (0xffffff07) AXIS_AILERONS_SET
       925734 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 5891 (0x00001703) MIXTURE1_SET
       925750 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 5522 (0x00001592) MIXTURE1_SET
       925765 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 5152 (0x00001420) MIXTURE1_SET
       925796 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 4802 (0x000012c2) MIXTURE1_SET
       925812 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 4462 (0x0000116e) MIXTURE1_SET
       925843 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 4137 (0x00001029) MIXTURE1_SET
       925875 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 3837 (0x00000efd) MIXTURE1_SET
       925890 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 3556 (0x00000de4) MIXTURE1_SET
       925921 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 3305 (0x00000ce9) MIXTURE1_SET
       925937 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 3073 (0x00000c01) MIXTURE1_SET
       925968 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 2857 (0x00000b29) MIXTURE1_SET
       925984 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 2645 (0x00000a55) MIXTURE1_SET
       926015 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 2443 (0x0000098b) MIXTURE1_SET
       926031 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 2241 (0x000008c1) MIXTURE1_SET
       926062 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 2053 (0x00000805) MIXTURE1_SET
       926093 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 1866 (0x0000074a) MIXTURE1_SET
       926109 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 1679 (0x0000068f) MIXTURE1_SET
       926140 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 1472 (0x000005c0) MIXTURE1_SET
       926156 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 1275 (0x000004fb) MIXTURE1_SET
       926171 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 1088 (0x00000440) MIXTURE1_SET
       926187 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 926 (0x0000039e) MIXTURE1_SET
       926234 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 783 (0x0000030f) MIXTURE1_SET
       926250 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 669 (0x0000029d) MIXTURE1_SET
       926281 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 576 (0x00000240) MIXTURE1_SET
       926296 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 497 (0x000001f1) MIXTURE1_SET
       926328 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 438 (0x000001b6) MIXTURE1_SET
       926359 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 398 (0x0000018e) MIXTURE1_SET
       926375 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 388 (0x00000184) MIXTURE1_SET
       927656 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 379 (0x0000017b) MIXTURE1_SET
       928781 ***  AXIS: Cntrl= 65764 (0x000100e4), Param= 96 (0x00000060) AXIS_RUDDER_SET
       928875 ***  AXIS: Cntrl= 65764 (0x000100e4), Param= 79 (0x0000004f) AXIS_RUDDER_SET
       930296 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 369 (0x00000171) MIXTURE1_SET
       930375 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 359 (0x00000167) MIXTURE1_SET
       930453 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 349 (0x0000015d) MIXTURE1_SET
       930500 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 339 (0x00000153) MIXTURE1_SET
       ... wait a few seconds to cut off ...
       930531 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 295 (0x00000127) MIXTURE1_SET
       930546 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 201 (0x000000c9) MIXTURE1_SET
       930578 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 59 (0x0000003b) MIXTURE1_SET
       930593 ***  AXIS: Cntrl= 65919 (0x0001017f), Param= 0 (0x00000000) MIXTURE1_SET

     

  2. 5 hours ago, John Dowson said:

    I will also look into this further...I think offset writes to user-defined offsets are automatically copied to the read area, which is why the 2nd condition would be true. For offsets that have lvars added to them, there should be no copy and the read offset area should only be updated when the new value is received from the FS.

    Thanks... this would be great if it could act more "atomic". Please let me know if you need to me test.

    5 hours ago, John Dowson said:

    What you could do is just use the offsets for reading the lvar state and change them using calculator code / presets. So, you would define a preset (in your myevents.txt file):
         Aux_Bus#$Param (>L:XMLVAR_AUX_Bus_ON)
    And then assign to that preset (with parameters 1 and 0 respectively) instead of the Offset Byte Set control.

    I see, since this doesn't update the offset area, it would have to come from the sim, which shouldn't happen while button processing is happening? I'll take a look at this functionality (haven't used it in the past). So I have to have both the offset mechanism to read the state and use it in the conditional, and the macro to execute the change,

  3. I hate to come with more support requests, but here it goes... 🙂

    I'm trying to use an LVar to toggle a switch in the Kodiak (XMLVAR_AUX_Bus_ON to either 0 or 1).

    I'm moving this into an offset, and then using conditionals to set them based on their current state.

    [LvarOffsets]
    1=L:XMLVAR_AUX_Bus_ON=UB0xA000
    
    [Buttons]
    10=BA000=0 P64,8,Cx0100A000,x01 	-{offset byte set, offset A000}-
    11=BA000>0 P64,8,Cx0100A000,x00 	-{offset byte set, offset A000}-

    The challenge seems to be that after #10, when A000 is set to 1, #11 tests TRUE and immediately sets it back to 0.

    Here it is turning it off (from an on state):

      1206718 Monitor IPC:A000 (U8) = 1
      1210562 Button changed: bRef=0, Joy=64, Btn=8, Pressed
      1210562 [Buttons.Kodiak 100 cargo pod, Factory paint A4] 10=BA000=0 P64,8,Cx0100A000,x01
      1210562 .... Offset check: xA000/1 = 0? (1), Result = FALSE
      1210562 [Buttons.Kodiak 100 cargo pod, Factory paint A4] 11=BA000>0 P64,8,Cx0100A000,x00
      1210562 .... Offset check: xA000/1 > 0? (1), Result = TRUE
      1210562 IPC Offsets Control: Ctrl=x0100, Length=1, Offset=A000, Param=x0
      1210562 Monitor IPC:A000 (U8) = 0
      1210687 Button changed: bRef=0, Joy=64, Btn=8, Released

    And here it is trying to turn it back on (when it's in an off state):

      1298265 Button changed: bRef=0, Joy=64, Btn=8, Pressed
      1298265 [Buttons.Kodiak 100 cargo pod, Factory paint A4] 10=BA000=0 P64,8,Cx0100A000,x01
      1298265 .... Offset check: xA000/1 = 0? (0), Result = TRUE
      1298265 IPC Offsets Control: Ctrl=x0100, Length=1, Offset=A000, Param=x1
      1298265 [Buttons.Kodiak 100 cargo pod, Factory paint A4] 11=BA000>0 P64,8,Cx0100A000,x00
      1298265 .... Offset check: xA000/1 > 0? (1), Result = TRUE
      1298265 IPC Offsets Control: Ctrl=x0100, Length=1, Offset=A000, Param=x0
      1298296 Button changed: bRef=0, Joy=64, Btn=8, Released

    Notice that both conditions are true, which shouldn't be (per a previous thread).

    Here's a previous post where I ran into this, but that was resolved through some other means (e.g. an update to variable offsets).

    Any thoughts? There are some other LVars that are multi-state that I'd like to do this for as well, while keeping the sim state together with the button action (which is why button flags don't work).

    Thanks,

    John

     

  4. So the challenge is that the 8192 output is wherever I set the "detent" min/max. I'm using a Virtual Fly TQ6+, for which the detent (physical notch) I calibrated around raw input of -11000 .. -9500. This is the range where I would like an "out" of 256 (or whatever) instead of 8192. Currently FSUIPC calibration is already doing 2 lerps; one for below the detent and one for above the detent, with 8192 as the midpoint of the output (in my case for the TQ6+ this looks like):

    • -16250 .. -11000 -> 0 .. 8192 (~5000 range -> ~8000 range)
    • -9500 .. 16250 -> 8192 .. 16383 (~26000 range -> ~8000 range)

    What I'm trying to do is to get this instead:

    • -16250 .. -11000 -> 0 .. 256 (~5000 range -> ~250 range)
    • -9500 .. 16250 -> 256 .. 16383 (~26000 -> ~15750 range)

    This what I meant by making the "midpoint" settable for the output (wherever you lerp with 8192, instead it would be some setting).

    I can do this in Lua, I was just hoping it would be easy to add some extension to the calibration INI settings to have this 8192 be custom.

    I can also probably make this work with ranges for the Kodiak.

    Anyway, no worries, the discussion is helpful.

     

  5. Thanks, I'll try with the Lua hard-coding the calibration values (these are same regardless of profile since it's the same joystick).

    My, perhaps simple, thought was that the only thing that changes in this calculation is the output midpoint (since you're already calibrating the 2 ranges differently since the detent is not guaranteed to be at the middle of the raw input range):

    • Ri = Raw input
    • Rmin = Raw minimum (as set)
    • Rmax = Raw maximum (as set)
    • Rmindet = Raw min detent (as set)
    • Rmaxdet = Raw max detent (as set)
    • Omin = Min output (e.g. documented as 0)
    • Omid = Midpoint (e.g. currently constant as 8192, but since this is up to aircraft developers whims, could be 256 - as set - in my example, the Kodiak)
    • Omax = Max output (e.g. documented as 16383)

    So something like:

    • if Ri < Rmindet: return lerp Rmin:Rmindet -> Omin-Omid
    • else if Ri > Rmaxdet: return lerp Rmaxdet:Rmax -> Omid-Omax
    • else return Omid

    But maybe I'm missing some other complexity somewhere. I definitely wasn't suggesting a UI change.

    I think a profile specific Lua will be fine. Thanks again for talking through it.

  6. 4 minutes ago, John Dowson said:

    You will just get the axis value. It is up to you to know what that value is and what to do with it....you can kif the value received, to see what that is when the position is at (or around) the detent position.

    The calibration values are useful to know where the raw axis top/bottom/detents are. Without access to these programmatically, I have to hard-code them in a Lua (and thus they will be in 2 places, the INI - which can change when I recalibrate occasionally, and some script - which I have to remember to update). For my use case, the only thing I need is a different lerp below/above the detent, but it would be useful to have access to the existing calibration values, even when I'm not using the calibration itself.

    The midpoint is really the only thing that changes in this setup, and this seems to be hardcoded for these axes currently.

    Can a monitoring Lua be profile specific?

  7. I ran into this just yesterday. If you've set profile specific buttons, they "hide" you're default button configuration, so they are auto-loaded and work as expected.

    It looks like that checkbox is simply to decide which assignment you're editing (note that it's different than the axes checkbox is becomes immutable).

     

  8. 2 hours ago, John Dowson said:

    It sounds like you want to calibrate the lower part of the throttle axis differently than the rest of the range...The only way you could do this would be using a lua script. You can assign your throttle axis value to an FSUIPC offset, have a lua script monitor that offset to get the value and then send on the required value to the FS.

    John

    Is it possible to adjust the output of the calibrated value in Lua before it's sent to the sim? This would seem the simplest since I know what the nominal midpoint is.

    Or, is it possible to get access to the calibration points in the Lua? These are useful to know where the detent area is.

    Or, better yet 🙂, would it be possible to add an advanced setting in the calibration area where the midpoint could be set/overridden?

  9. I'm using FSUIPC Joystick Calibration with a reverse zone on the mixture (e.g. detent). This works well for some turbine aircraft, however the Kodiak is a little bit different. The cutoff is 0 and low idle seems to be some small positive value, so the normal midpoint output of 8192 at the detent of my mixture is not low idle in the aircraft (but much higher). Is there an easy way to set what the "out" midpoint should be when the axis is in the "detent" zone of the calibration, as opposed to assuming an even split?

  10. 1 hour ago, John Dowson said:

    Well, it can be made available, by looking at the value of 3 simvars: CIRCUIT SWITCH ON, BUS LOOKUP INDEX and BUS CONNECTION ON.
    If needed, you can add them to free offsets, and use a lua script to update a fourth/fifth offset with the actual avionics master 1/2 state when any of those change.

    John

    Thanks, I'll take a look at those.

  11. 53 minutes ago, John Dowson said:

    This will almost certainly depend on the aircraft that you are using, i.e. will be different for each aircraft (use profiles). Try searching for a preset for separate avionics on https://hubhop.mobiflight.com/presets/ for the aircraft you are using, and you can then assign to these by checking the Select for preset checkbox. If you look at the code for the preset, this should indicate the lvar which holds the individual avionics states, and you can add these lvars to an FSUIPC offset if you want to read the state.

    John

    Thanks, odd that these don't seem to be available even though you can independently set them (e.g. the 172).

     

  12. Hi Pete and John,

    I'm trying to make my button configuration more manageable and have been renumbering my configuration.

    I'm spacing the numbers by the 10s (since I have multiple assignment for many) to make it easier to locate related actions in the future.

    I am also using <1000 for real buttons and 1000+ for the virtual joysticks, where the thousands is the joystick number (e.g 1000 = first, 2000 = second), then the button number * 10.

    This would work greats, however it looks like the numbers are only supported up to 2099, at which point things are ignored, and new assignments wrap to 0.

    With the virtual joystick 9, for example, I would like the use the range 9000-9310.

    Is it possible to increase the allowed numbering?

    Thanks,

    PJ

  13. Hi Everyone,

    I'm looking to see if anyone managed to get the Caravan condition lever to work through FSUIPC?

    It seems to be using SET_FUEL_VALVE_ENG1, but something's off. It has 3 positions: cutoff, low and high.

    When moving the lever in the sim, I see the events but both high and low have a param of 1, and cutoff 0.

    Sending these form FSUIPC gets me cutoff at 0, and low at 1, but I can't seem to get into "high" from "low" or from "high" to "low" (sending 1 as param).

    I found an Lvar called Condition_Lever_CutOff_1, which is set to 2.0 when the level is high, but setting this via FSUIPC does nothing in the aircraft.

    PJ

     

     

  14. Is this fully working for everyone?

    I configured it and it appears to do what it expected ...

    • Logging A000 shows the correct axis positions (-1 to 1)
    • Listing lvars and looking at THROTTLE<N>_SET shows the value written
    • The message panel in the aircraft shows a T/O config warning when throttle is advanced

    But I have to move the throttle out of cut-off first, otherwise:

    • Throttles don't move
    • No indication changes in the thrust display
    • Engines don't spool up

    Has anyone made the cut-off to idle work in the 0 to -16384 range?

     

     

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