Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I have a Spitfire cockpit with authentic style control inputs. A real Spitfire does not have toe brakes but has a single lever on the control column for the brakes. A pneumatic valve configuration operated through the Rudder control allows this single lever to actuate the left and right wheel brakes independently/differentially. 

For those with a single brake lever like mine, the following LUA script simulated this facility in the MSFS spitfires by mixing the analog Rudder input with another single analog Brake input to provide standard MSFS Toe Brake outputs. 

I have successfully tested following LUA file originally written for me by John Dowson with the Flying Iron Mk IX and the Airplane Heaven Mk1a Spitfire models for MSFS. 

The file should be placed in the FSUIPC7 folder and the lines: 

[Auto]
1=Lua spitfireBrake 
added to the end of the FSUIPC7.ini file

or add 1=Lua spitfireBrake in the [Auto.xxx] section (where xxx is the name of your spitfire profile).

 

You also then need to assign both your rudder and brake lever axis in FSUIPC7 using Send to FSUIPC Offset with Offset Dword Set. The script uses offset 0xA000 for the rudder axis and 0xA004 for the brake lever axis - use these or update the script to the ones that you use.

spitfireBrake.lua

  • Like 1
  • 1 year later...
Posted
52 minutes ago, Darth JBell said:

I’ll take a look although I’m running PREPAR3D w/FSUIPC version 6.  The Behr Studio/Sim Market folks say the Chang doesn’t work w/MSFS 2020.

This post is for the Spitfire brake. I  referenced it for you as you need to do something similar for the CJ-6 Nanchang. I will help you with this in the thread where you asked. Once this is done, you can create a User Contribution similar to this to explain to others how to do this in the CJ-6.

Posted
8 minutes ago, John Dowson said:

This post is for the Spitfire brake. I  referenced it for you as you need to do something similar for the CJ-6 Nanchang. I will help you with this in the thread where you asked. Once this is done, you can create a User Contribution similar to this to explain to others how to do this in the CJ-6.

Sounds good, Sir!

  • 1 year later...
Posted (edited)

Hi John, 

As per my post on the last thread, yes I assigned as per the instructions. The only change I made was setting "local brakeReversed =" to true. 

I can see from looking at this, and my findings in the sim that the rudder input is applying the brakes irrespective of the actual input to the brake lever. The brake lever is itself running so that it can be pressed and will apply the brakes, but again does take into account the rudder position. 

Sorry as I am unable to see how to resolve this in the code, or if I myself have done something wrong. 

PSB log: 

Unfortunately the attachment limit is too small for me to attach the log.

Quote

********* FSUIPC7, Version 7.5.4 (13th July 2025) by John Dowson *********
WebSocket server found: D:\FSUIPC\\Utils\FSUIPCWebSocketServer.exe
Windows 11 detected - setting DisableMSFSMonitor to 'Enum'
Windows 10 Home 64 Bit reported as Build 22631, Release ID: 2009 (OS 10.0)
FSUIPC is running with standard privileges
Reading options from "D:\FSUIPC\FSUIPC7.ini"
Checking the Registrations now ...
User Name="harry smith"
User Addr="smithy-harry@hotmail.co.uk"
FSUIPC7 Key is provided
WIDEFS7 not user registered, or expired
       47 System time = 06/08/2025 17:31:21
       47 Allowing calibration when not assigned with 'Send direct to FSUIPC Calibration'
       63 -------------------------------------------------------------------
       63 *** Preset name 'Cirrus_SF50_Vision_Jet__MSFS2024_-_Toggle_VNV_Button_in_Autopilot_On_and_OFF' exceeds max allowed length of 63 characters - ignoring
      219 *** Preset name 'NAV_GPS_SWAP__NAV__button_on_EFIS_Control_Panel__LEFT_SIDE__CAPTAIN_' exceeds max allowed length of 63 characters - ignoring
      219 *** Preset name 'NAV_GPS_SWAP__NAV__button_on_EFIS_Control_Panel__RIGHT__SIDE__FIRST_OFFICER_' exceeds max allowed length of 63 characters - ignoring
      235 *** Preset name 'Main_instrument_panel_standby_attitude_indicator_cage_button_release' exceeds max allowed length of 63 characters - ignoring
      235 Preset file 'D:\FSUIPC\myevents.txt' not found [info only]
      235 19666 Calculator Code presets have been loaded and are available for use
      266 Registered HotKey 'InvokeFSUIPCOptionsKey' (key=0x46, modifier=0x1)
      282 FS path = ""
      297 ---------------------- Joystick Device Scan -----------------------
      297 Product= Rhino FFB Joystick
      297    Manufacturer= VPforce
      297    Serial Number= 3359534E0100004C52006600
      297    Vendor=FFFF, Product=2055 (Version 2.8)
      360    GUIDs returned for product: VID_FFFF&PID_2055:
      360       GUID= {A8C007E0-1192-11F0-800C-444553540000}
      360       Details: Btns=64, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R255,U255,V255,X4096,Y4096,Z4096
      360 Product= MFG Crosswind V2
      360    Manufacturer= MFG
      360    Serial Number= MFG500002
      360    Vendor=16D0, Product=0A38 (Version 33.1)
      360    GUIDs returned for product: VID_16D0&PID_0A38:
      360       GUID= {1ECE9D80-1192-11F0-8009-444553540000}
      360       Details: Btns=2, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R4096,U0,V0,X4096,Y4096,Z0
      360 Product= L-VPC Throttle MT-50
      375    Manufacturer= VIRPIL Controls/20210102
      375    Vendor=3344, Product=8191 (Version 0.1)
      375    GUIDs returned for product: VID_3344&PID_8191:
      375       GUID= {564B53C0-1192-11F0-800A-444553540000}
      375       Details: Btns=84, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R16384,U16384,V16384,X0,Y0,Z16384
      375 Product= Bravo Throttle Quadrant
      375    Manufacturer= Honeycomb Aeronautical
      375    Serial Number= 6F7B2E091F1A3B00
      375    Vendor=294B, Product=1901 (Version 1.5)
      375    GUIDs returned for product: VID_294B&PID_1901:
      375       GUID= {966C4330-10C3-11F0-8001-444553540000}
      375       Details: Btns=48, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R1023,U1023,V1023,X1023,Y1023,Z1023
      375 -------------------------------------------------------------------
      375 Device acquired for use:
      375    Joystick ID = 3 (Registry okay)
      375    3=VPforce Rhino FFB Joystick
      375    3.GUID={A8C007E0-1192-11F0-800C-444553540000}
      375 Device acquired for use:
      375    Joystick ID = 1 (Registry okay)
      375    1=MFG Crosswind V2
      375    1.GUID={1ECE9D80-1192-11F0-8009-444553540000}
      375 Device acquired for use:
      375    Joystick ID = 2 (Registry okay)
      375    2=L-VPC Throttle MT-50
      375    2.GUID={564B53C0-1192-11F0-800A-444553540000}
      375 Device acquired for use:
      375    Joystick ID = 0 (Registry okay)
      375    0=Bravo Throttle Quadrant
      375    0.GUID={966C4330-10C3-11F0-8001-444553540000}
      375 -------------------------------------------------------------------
      407 LogOptions=00000000 00000001
      407 Manually started with DetectToConnectDelay=1, InitialStallTime=15
     3266 Simulator detected
     4266 Trying to connect...
     4282 SimConnect_Open succeeded
     4282 Running in "SunRise", Version: 12.2.282174.999 (SimConnect: 12.2.0.0)
     4282 MSFS version = 12.2.282174.999
     4282 MSFS 2024 Steam installation detected
     4282 Checking for FS path in 'C:\Users\Harry\AppData\Roaming\Microsoft Flight Simulator 2024\UserCfg.opt'
     4282 FS path found = D:\MSFS Community\
     4282 FLT path = "C:\Users\Harry\AppData\Roaming\Microsoft Flight Simulator 2024\"
     4282 FS path = "D:\MSFS Community\"
     4282 Initialising SimConnect data requests now
     4282 Offset file 'D:\FSUIPC\myOffsets.txt' not found (info only)
     4282 Number of FS control/events registered : 1795
     4282 Mapping custom control numbers 69632 - 84232 (maximum defined by ini parameter MaxCustomControlNumber, defaults to 84232 when not present)
     4297 Maximum number of custom events available is 1024 (defined by ini parameter MaxNumberOfCustomEvents)
     4297 C:\Users\Harry\AppData\Roaming\Microsoft Flight Simulator 2024\MISSIONS\Custom\CustomFlight\CustomFlight.FLT
     4422 User Aircraft ID 39387136 supplied, now being used (myftm=1)
     4422 Requesting keyboard input...
     4422 Requesting user aircraft data...
     4704 Aircraft loaded: running normally now ...
     4704 System time = 06/08/2025 17:31:26, Simulator time = 17:31:26 (16:31Z)
     4704 Requesting Input Events....
     4704 Starting WAPI (WAPI enabled)...
     4704   [INFO]: **** Starting FSUIPC7 WASM Interface (WAPI) version 1.0.4 (WASM version 1.0.7) using connection -1
     4704   [INFO]: Connected to MSFS
     4704 Aircraft="Lancaster NX611 Just Jane"
     4704 -------------------- Starting everything now ----------------------
     4766 Lvars received: 331 L:vars & 0 H:vars now available
     4766 Lvars/Hvars received - checking aircraft autos....
     4829 LUA.1: Spitfire differential brake lua started
     4860 LUA.1: rudderChange: value=0
     4875 LUA.1: rudderControl sent with value=0
     4891 LUA.1: Rudder %: 50 , brake %:100
     4907 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
     4922 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
     4938 LUA.1: brakeChange: value=0
     4954 LUA.1: Rudder %: 50 , brake %:50
     4969 LUA.1: Left brake value sent: -0 (rudder % used: 100)
     4985 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     5891 LUA.1: rudderChange: value=816
     5907 LUA.1: rudderControl sent with value=816
     5922 LUA.1: Rudder %: 52.490386376122 , brake %:50
     5938 LUA.1: Left brake value sent: 816 (rudder % used: 95.019227247757)
     5954 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     5985 LUA.1: rudderChange: value=6744
     6000 LUA.1: rudderControl sent with value=6744
     6016 LUA.1: Rudder %: 70.582310932064 , brake %:50
     6032 LUA.1: Left brake value sent: 6744 (rudder % used: 58.835378135873)
     6047 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6079 LUA.1: rudderChange: value=12079
     6094 LUA.1: rudderControl sent with value=12079
     6110 LUA.1: Rudder %: 86.864432643594 , brake %:50
     6125 LUA.1: Left brake value sent: 12079 (rudder % used: 26.271134712812)
     6141 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6172 LUA.1: rudderChange: value=7576
     6188 LUA.1: rudderControl sent with value=7576
     6204 LUA.1: Rudder %: 73.121528413599 , brake %:50
     6219 LUA.1: Left brake value sent: 7576 (rudder % used: 53.756943172801)
     6235 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6266 LUA.1: rudderChange: value=2608
     6282 LUA.1: rudderControl sent with value=2608
     6297 LUA.1: Rudder %: 57.959470182506 , brake %:50
     6313 LUA.1: Left brake value sent: 2608 (rudder % used: 84.081059634987)
     6329 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6360 LUA.1: rudderChange: value=0
     6375 LUA.1: rudderControl sent with value=0
     6391 LUA.1: Rudder %: 50 , brake %:50
     6407 LUA.1: Left brake value sent: -0 (rudder % used: 100)
     6422 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6704 LUA.1: rudderChange: value=456
     6719 LUA.1: rudderControl sent with value=0
     6735 LUA.1: Rudder %: 50 , brake %:50
     6750 LUA.1: Left brake value sent: -0 (rudder % used: 100)
     6766 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6797 LUA.1: rudderChange: value=7512
     6813 LUA.1: rudderControl sent with value=7512
     6829 LUA.1: Rudder %: 72.926203991943 , brake %:50
     6844 LUA.1: Left brake value sent: 7512 (rudder % used: 54.147592016114)
     6860 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6891 LUA.1: rudderChange: value=13135
     6907 LUA.1: rudderControl sent with value=13135
     6922 LUA.1: Rudder %: 90.087285600928 , brake %:50
     6938 LUA.1: Left brake value sent: 13135 (rudder % used: 19.825428798144)
     6954 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     6985 LUA.1: rudderChange: value=13399
     6985 LUA.1: rudderControl sent with value=13399
     7000 LUA.1: Rudder %: 90.892998840261 , brake %:50
     7016 LUA.1: Left brake value sent: 13399 (rudder % used: 18.214002319478)
     7032 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     7063 LUA.1: rudderChange: value=12311
     7079 LUA.1: rudderControl sent with value=12311
     7094 LUA.1: Rudder %: 87.572483672099 , brake %:50
     7110 LUA.1: Left brake value sent: 12311 (rudder % used: 24.855032655802)
     7125 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     7157 LUA.1: rudderChange: value=4440
     7172 LUA.1: rudderControl sent with value=4440
     7188 LUA.1: Rudder %: 63.550631752426 , brake %:50
     7204 LUA.1: Left brake value sent: 4440 (rudder % used: 72.898736495147)
     7219 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     7250 LUA.1: rudderChange: value=24
     7266 LUA.1: rudderControl sent with value=0
     7282 LUA.1: Rudder %: 50 , brake %:50
     7297 LUA.1: Left brake value sent: -0 (rudder % used: 100)
     7313 LUA.1: Rught brake value sent: -0 (rudder % used: 100)
     8594 LUA.1: brakeChange: value=8575
     8610 LUA.1: Rudder %: 50 , brake %:76.170420557895
     8625 LUA.1: Left brake value sent: -8575 (rudder % used: 100)
     8641 LUA.1: Rught brake value sent: -8575 (rudder % used: 100)
     8657 LUA.1: brakeChange: value=-16384
     8672 LUA.1: Rudder %: 50 , brake %:-0.0030519440883843
     8688 LUA.1: Left brake value sent: 16384 (rudder % used: 100)
     8688 LUA.1: Rught brake value sent: 16384 (rudder % used: 100)
     9063 LUA.1: brakeChange: value=-15083
     9079 LUA.1: Rudder %: 50 , brake %:3.9675273148996
     9094 LUA.1: Left brake value sent: 15083 (rudder % used: 100)
     9110 LUA.1: Rught brake value sent: 15083 (rudder % used: 100)
     9125 LUA.1: brakeChange: value=7552
     9141 LUA.1: Rudder %: 50 , brake %:73.048281755478
     9157 LUA.1: Left brake value sent: -7552 (rudder % used: 100)
     9172 LUA.1: Rught brake value sent: -7552 (rudder % used: 100)
     9188 LUA.1: brakeChange: value=16127
     9204 LUA.1: Rudder %: 50 , brake %:100
     9219 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
     9235 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
     9282 LUA.1: brakeChange: value=16383
     9297 LUA.1: Rudder %: 50 , brake %:100
     9313 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
     9329 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
     9829 LUA.1: brakeChange: value=16127
     9844 LUA.1: Rudder %: 50 , brake %:100
     9860 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
     9875 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
     9891 LUA.1: brakeChange: value=5376
     9907 LUA.1: Rudder %: 50 , brake %:66.407251419154
     9922 LUA.1: Left brake value sent: -5376 (rudder % used: 100)
     9938 LUA.1: Rught brake value sent: -5376 (rudder % used: 100)
     9954 LUA.1: brakeChange: value=-15734
     9969 LUA.1: Rudder %: 50 , brake %:1.9807117133614
     9985 LUA.1: Left brake value sent: 15734 (rudder % used: 100)
    10000 LUA.1: Rught brake value sent: 15734 (rudder % used: 100)
    10000 LUA.1: brakeChange: value=-16384
    10016 LUA.1: Rudder %: 50 , brake %:-0.0030519440883843
    10032 LUA.1: Left brake value sent: 16384 (rudder % used: 100)
    10047 LUA.1: Rught brake value sent: 16384 (rudder % used: 100)
    10204 LUA.1: brakeChange: value=-15734
    10219 LUA.1: Rudder %: 50 , brake %:1.9807117133614
    10235 LUA.1: Left brake value sent: 15734 (rudder % used: 100)
    10250 LUA.1: Rught brake value sent: 15734 (rudder % used: 100)
    10266 LUA.1: brakeChange: value=1920
    10282 LUA.1: Rudder %: 50 , brake %:55.859732649698
    10297 LUA.1: Left brake value sent: -1920 (rudder % used: 100)
    10313 LUA.1: Rught brake value sent: -1920 (rudder % used: 100)
    10329 LUA.1: brakeChange: value=12927
    10344 LUA.1: Rudder %: 50 , brake %:89.452481230544
    10360 LUA.1: Left brake value sent: -12927 (rudder % used: 100)
    10375 LUA.1: Rught brake value sent: -12927 (rudder % used: 100)
    10391 LUA.1: brakeChange: value=16127
    10407 LUA.1: Rudder %: 50 , brake %:100
    10422 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    10438 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    10454 LUA.1: brakeChange: value=16383
    10469 LUA.1: Rudder %: 50 , brake %:100
    10485 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    10500 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    10516 LUA.1: brakeChange: value=16383
    10532 LUA.1: Rudder %: 50 , brake %:100
    10547 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    10563 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    10594 LUA.1: rudderChange: value=264
    10610 LUA.1: rudderControl sent with value=0
    10625 LUA.1: Rudder %: 50 , brake %:100
    10641 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    10657 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    10891 LUA.1: rudderChange: value=0
    10907 LUA.1: rudderControl sent with value=0
    10922 LUA.1: Rudder %: 50 , brake %:100
    10938 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    10954 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    10985 LUA.1: rudderChange: value=-1073
    11000 LUA.1: rudderControl sent with value=-1073
    11016 LUA.1: Rudder %: 46.725263993164 , brake %:100
    11032 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    11047 LUA.1: Rught brake value sent: -14237 (rudder % used: 93.450527986327)
    11079 LUA.1: rudderChange: value=-8212
    11094 LUA.1: rudderControl sent with value=-8212
    11110 LUA.1: Rudder %: 24.937435146188 , brake %:100
    11125 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    11141 LUA.1: Rught brake value sent: 41 (rudder % used: 49.874870292376)
    11172 LUA.1: rudderChange: value=-13983
    11188 LUA.1: rudderControl sent with value=-13983
    11204 LUA.1: Rudder %: 7.3246658121223 , brake %:100
    11219 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    11235 LUA.1: Rught brake value sent: 11583 (rudder % used: 14.649331624245)
    11266 LUA.1: rudderChange: value=-14607
    11282 LUA.1: rudderControl sent with value=-14607
    11297 LUA.1: Rudder %: 5.4202527009705 , brake %:100
    11313 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    11329 LUA.1: Rught brake value sent: 12831 (rudder % used: 10.840505401941)
    11422 LUA.1: rudderChange: value=-15191
    11438 LUA.1: rudderControl sent with value=-15191
    11454 LUA.1: Rudder %: 3.6379173533541 , brake %:100
    11469 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    11485 LUA.1: Rught brake value sent: 13999 (rudder % used: 7.2758347067082)
    11500 LUA.1: rudderChange: value=-16256
    11516 LUA.1: rudderControl sent with value=-16256
    11532 LUA.1: Rudder %: 0.38759689922481 , brake %:100
    11547 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    11563 LUA.1: Rught brake value sent: 16129 (rudder % used: 0.77519379844961)
    12094 LUA.1: rudderChange: value=-15743
    12110 LUA.1: rudderControl sent with value=-15743
    12125 LUA.1: Rudder %: 1.953244216566 , brake %:100
    12141 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    12157 LUA.1: Rught brake value sent: 15103 (rudder % used: 3.9064884331319)
    12188 LUA.1: rudderChange: value=-8540
    12204 LUA.1: rudderControl sent with value=-8540
    12219 LUA.1: Rudder %: 23.936397485198 , brake %:100
    12235 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    12250 LUA.1: Rught brake value sent: 697 (rudder % used: 47.872794970396)
    12282 LUA.1: rudderChange: value=4360
    12297 LUA.1: rudderControl sent with value=4360
    12313 LUA.1: Rudder %: 63.306476225356 , brake %:100
    12329 LUA.1: Left brake value sent: -7663 (rudder % used: 73.387047549289)
    12344 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    12375 LUA.1: rudderChange: value=9103
    12391 LUA.1: rudderControl sent with value=9103
    12407 LUA.1: Rudder %: 77.781847036562 , brake %:100
    12422 LUA.1: Left brake value sent: 1823 (rudder % used: 44.436305926875)
    12438 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    12469 LUA.1: rudderChange: value=9743
    12485 LUA.1: rudderControl sent with value=9743
    12500 LUA.1: Rudder %: 79.735091253128 , brake %:100
    12516 LUA.1: Left brake value sent: 3103 (rudder % used: 40.529817493744)
    12532 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    12563 LUA.1: rudderChange: value=14015
    12579 LUA.1: rudderControl sent with value=14015
    12594 LUA.1: Rudder %: 92.772996398706 , brake %:100
    12610 LUA.1: Left brake value sent: 11647 (rudder % used: 14.454007202588)
    12625 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    12657 LUA.1: rudderChange: value=15935
    12672 LUA.1: rudderControl sent with value=15935
    12688 LUA.1: Rudder %: 98.632729048404 , brake %:100
    12704 LUA.1: Left brake value sent: 15487 (rudder % used: 2.7345419031923)
    12719 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    12750 LUA.1: rudderChange: value=16223
    12766 LUA.1: rudderControl sent with value=16223
    12782 LUA.1: Rudder %: 99.511688945859 , brake %:100
    12797 LUA.1: Left brake value sent: 16063 (rudder % used: 0.97662210828298)
    12813 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    13282 LUA.1: rudderChange: value=15655
    13297 LUA.1: rudderControl sent with value=15655
    13313 LUA.1: Rudder %: 97.778184703656 , brake %:100
    13329 LUA.1: Left brake value sent: 14927 (rudder % used: 4.4436305926876)
    13344 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    13375 LUA.1: rudderChange: value=9751
    13391 LUA.1: rudderControl sent with value=9751
    13407 LUA.1: Rudder %: 79.759506805835 , brake %:100
    13422 LUA.1: Left brake value sent: 3119 (rudder % used: 40.480986388329)
    13438 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    13469 LUA.1: rudderChange: value=1248
    13485 LUA.1: rudderControl sent with value=1248
    13500 LUA.1: Rudder %: 53.808826222304 , brake %:100
    13516 LUA.1: Left brake value sent: -13887 (rudder % used: 92.382347555393)
    13532 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    13563 LUA.1: rudderChange: value=72
    13579 LUA.1: rudderControl sent with value=0
    13594 LUA.1: Rudder %: 50 , brake %:100
    13610 LUA.1: Left brake value sent: -16383 (rudder % used: 100)
    13625 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    17079 === Hot key unregistered
    17079 === Stop called ...
    17079 === Closing external processes we started ...
    17594 === About to kill any Lua plug-ins still running ...
    17750 Lua threads being terminated:
    17750       1 = "D:\FSUIPC\spitfireBrake.lua"
    17938 LUA: "D:\FSUIPC\spitfireBrake.lua": killed
    17938 === Closing global Lua thread
    18719 === About to kill my timers ...
    18922 === Restoring window procs ...
    18922 === Unloading libraries ...
    18922 === stopping other threads ...
    18922 === ... Button scanning ...
    19016 === ... Axis scanning ...
    19125 === Releasing joystick devices ...
    19125 === Freeing macro memory
    19125 === Removing any offset overrides
    19125 === Clearing any displays left
    19125 === Calling SimConnect_Close ...
    19344 === SimConnect_Close done!
    19344 === AI slots deleted!
    19344 === Freeing button memory ...
    19344 === Closing my Windows ...
    19344 === Freeing FS libraries ...
    20360 === Closing devices ...
    20360 === Closing the Log ... Bye Bye! ...
    20360 System time = 06/08/2025 17:31:41
    20360 *** FSUIPC log file being closed
Minimum frame rate was 42.7 fps, Maximum was 46.1 fps
Average frame rate for running time of 13 secs = 44.1 fps
Maximum AI traffic for session was 14 aircraft
Traffic deletions 0 aircraft
Memory managed: 10 Allocs, 8 Freed
********* FSUIPC Log file closed ***********
 

** Edit : for completeness, this is your initial description of the issue ***

Quote

 

I was very happy to discover this solution for making it possible to use differential braking with one axis in msfs. The Avro Lancaster (amongst others) also used this single lever for differential braking. 

I have been trying to make it work in my sim, however I have reached a dead end. Presently:

Pulling the lever applies both brakes - excellent!

When I add left rudder the left brake comes on, and the right reduces, visa versa - great, apart from it does this without input from the brake lever. 

When the brake lever is applied and rudder is input, the brakes just come on as if there was no differential braking. 

I apologies as this is beyond my basic understanding of the FSUIPC world, so any help would be appreciated. I have searched around and attempted to change numerous settings with no joy.

 

 

Edited by John Dowson
Initial problem description added
Posted
5 minutes ago, Hazzer111 said:

Unfortunately the attachment limit is too small for me to attach the log.

You can always compress/zip it. Your attachment limit will increase the more you post.

7 minutes ago, Hazzer111 said:

I can see from looking at this, and my findings in the sim that the rudder input is applying the brakes irrespective of the actual input to the brake lever. The brake lever is itself running so that it can be pressed and will apply the brakes, but again does take into account the rudder position. 

Looking at that log, you are getting some differential braking via FSUIPC, e.g.

Quote

    12688 LUA.1: Rudder %: 98.632729048404 , brake %:100
    12704 LUA.1: Left brake value sent: 15487 (rudder % used: 2.7345419031923)
    12719 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)
    12750 LUA.1: rudderChange: value=16223
    12766 LUA.1: rudderControl sent with value=16223
    12782 LUA.1: Rudder %: 99.511688945859 , brake %:100
    12797 LUA.1: Left brake value sent: 16063 (rudder % used: 0.97662210828298)
    12813 LUA.1: Rught brake value sent: -16383 (rudder % used: 100)

Can you check that you also don't have the brakes assigned to the brake axis events anywhere else, i.e. both in FSUIPC and in MSFS. Also, generate another log but this time also set logging for Axes Controls.

This script is also quite old and I can't remember it in detail. I will have to go over it again and get back to you. I am pretty busy at the moment so this may take a day or two.

John

 

Posted
2 hours ago, John Dowson said:

You can always compress/zip it. Your attachment limit will increase the more you post.

Looking at that log, you are getting some differential braking via FSUIPC, e.g.

Can you check that you also don't have the brakes assigned to the brake axis events anywhere else, i.e. both in FSUIPC and in MSFS. Also, generate another log but this time also set logging for Axes Controls.

This script is also quite old and I can't remember it in detail. I will have to go over it again and get back to you. I am pretty busy at the moment so this may take a day or two.

John

 

I definitely have no other inputs - I have triple checked presently this is the only thing I have set up fsuipc for as well. 

The script is doing something and it is almost correct but not quite right. 

As you say I do get differential braking, but it is doing that just off the rudder input alone (so with the brake released) - but as I had mentioned previously, the brake lever operates independently as well in this mode (when applied it applies brakes to left and right regardless of rudder pos).

Hope that makes sense as to what it should do and what it is actually doing. If needed I can send a video of it at some point. No rush getting to this either as I wont be at my pc for a few days.

Posted
16 hours ago, Hazzer111 said:

The only change I made was setting "local brakeReversed =" to true. 

I think this is the issue - or one of them. By setting this to true, the script is sending a value of +16384 for brakes off, and -16383 for brakes full on. Try setting that back to false. This variable is to reverse the brake axis values sent to the sim. In fact, the script is not clear on this and it seems that it wasn't tested properly with a reversed brake lever axis. I have corrected this in the attached script, so please try this and set brakeAxisReversed to true and leave brakeReversed as false.

The second issue is that the initial brake lever offset will be set at 0, which is 50% brakes. I have also attempted to correct this in the attached script, which explicitly calls the brakeChange function to set an initial value of -16383 ( or +16383 if reversed) so that brakes are initially off.

Please try this and let me know how it goes, and show me / attach your log if any issues (with enableLog set to true).

John

spitfireBrake.lua

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.