News:

Precision Simulator update 10.184 (15 September 2025) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

PFC Throttle Quadrant

Started by Bluestar, Tue, 29 Jul 2025 20:25

Hardy Heinlin

Quote from: Bluestar on Sat,  6 Sep 2025 16:52Is the 3rd party USB Java interface internal to PSX?

Partially. The core interface is in Aerowinx/Interfaces/. But you can't change that.

macroflight

Quote from: Bluestar on Sat,  6 Sep 2025 16:57Is it possible to have the THROTTLE_SYNC_SOUND and the GEAR Lever Control separate from the Throttle Axis Throttle/Reserve?  I would like to try running the Throttle Sync Sound and Gear Lever Control as a separate module.
(Some background for non-frankenusb users: frankenusb will ignore the USB throttle axis when the autothrottle is active. To make it easy to sync up the USB throttle position with the PSX throttle before pressing A/T disconnect, frankenusb will play a sound when the USB throttles match the PSX position)

Bluestar: what do you mean with "as a separate module"? On a different computer? Why? No speaker?

Bluestar

Quote from: macroflight on Sun,  7 Sep 2025 20:07Bluestar: what do you mean with "as a separate module"? On a different computer? Why? No speaker?


Macro,

In the .conf script that I posted earlier, the first two items concerned the throttle sync sound and the gear handle.  I tried deleting everything below the gear code in a new .conf file.  When I ran the new .conf file the gear worked, but the throttle sync sound did not.  I ran frankenusb in a dos prompt and there were no errors shown.  The throttle sync sound worked before I took out the code concerning the throttles.  Any suggestions on getting only these two items to work?
Grace and Peace,

Bode

macroflight

Quote from: Bluestar on Mon,  8 Sep 2025 00:18In the .conf script that I posted earlier, the first two items concerned the throttle sync sound and the gear handle.  I tried deleting everything below the gear code in a new .conf file.  When I ran the new .conf file the gear worked, but the throttle sync sound did not.  I ran frankenusb in a dos prompt and there were no errors shown.  The throttle sync sound worked before I took out the code concerning the throttles.  Any suggestions on getting only these two items to work?
Short answer: if you have no throttle, you cannot get a throttle sync sound, because it is not possible to know when to play it.

The THROTTLE_SYNC_SOUND setting will do nothing by itself, it is used when you have defined an axis of the AXIS_PSX_THROTTLE or THROTTLE_WITH_REVERSE_BUTTON type. Then the sound will be played when that USB axis is close to the associated PSX throttle position.

I still do not understand what it is you are trying to do and why. If you explain that, I can perhaps tell you whether it is possible with the current frankenusb.


Bluestar

Quote from: macroflight on Mon,  8 Sep 2025 06:19Short answer: if you have no throttle, you cannot get a throttle sync sound, because it is not possible to know when to play it.

The THROTTLE_SYNC_SOUND setting will do nothing by itself, it is used when you have defined an axis of the AXIS_PSX_THROTTLE or THROTTLE_WITH_REVERSE_BUTTON type. Then the sound will be played when that USB axis is close to the associated PSX throttle position.

I still do not understand what it is you are trying to do and why. If you explain that, I can perhaps tell you whether it is possible with the current frankenusb.



I am having an occasional problem with the .conf that I showed earlier.  While I work out the issues I wanted to continue to fly my sim.  Since the gear worked with no issues, and the throttle sync was really nice I had hoped to be able to use them in a separate .conf file.  Now that I understand the throttle sync operation, I will explore other remedies to my .conf issues.
Grace and Peace,

Bode

macroflight

Quote from: Bluestar on Mon,  8 Sep 2025 16:26I am having an occasional problem with the .conf that I showed earlier.  While I work out the issues I wanted to continue to fly my sim.  Since the gear worked with no issues, and the throttle sync was really nice I had hoped to be able to use them in a separate .conf file.  Now that I understand the throttle sync operation, I will explore other remedies to my .conf issues.
If you really want to use frankenusb for throttle sync sounds only (and gear lever) and to use PSX' USB for the actual throttle, I could add a config parameter to frankenusb that prevents it from sending throttle position updates to PSX, but the sound would still be played. But you would need to configure the throttle axis fully in frankenusb for this to work, otherwise it has no data to compare the PSX throttle position to. Let me know if you want this.

What is the "occasional problem" that prevents you from using frankenusb for the throttles? Maybe I can help with that instead?

Bluestar

Quote from: macroflight on Tue,  9 Sep 2025 08:51If you really want to use frankenusb for throttle sync sounds only (and gear lever) and to use PSX' USB for the actual throttle, I could add a config parameter to frankenusb that prevents it from sending throttle position updates to PSX, but the sound would still be played. But you would need to configure the throttle axis fully in frankenusb for this to work, otherwise it has no data to compare the PSX throttle position to. Let me know if you want this.

What is the "occasional problem" that prevents you from using frankenusb for the throttles? Maybe I can help with that instead?

Macro,

It would be greatly appreciated if you can add a config parameter to frankenhub that prevents it from sending throttle position updates to PSX.

Grace and Peace,

Bode

macroflight

Quote from: Bluestar on Tue,  9 Sep 2025 20:30It would be greatly appreciated if you can add a config parameter to frankenhub that prevents it from sending throttle position updates to PSX.
Here (download link) is a version where you can inhibit the sending of any variable to PSX. Just add a setting DO_NOT_SEND_TO_PSX to CONFIG_MISC that contains a list of the variables you want frankenusb to silently drop updates for ("Tla" is the one you want in this case).

E.g

CONFIG_MISC = {
    'THROTTLE_SYNC_SOUND': "C:\SOMEWHERE\somesound.wav",
    'DO_NOT_SEND_TO_PSX': [ 'Tla' ],
}

However... when I tested this I could not make it interact with a throttle setup in PSX in any way that felt meaningful. But I might have misunderstood what it is you're trying to do, so I made an executable for you anyway so you can try it and decide for yourself if it's useful.

Bluestar

Macro,

I am getting the following error -

 File "frankenusb-frankensim.conf", line 6
        'DO_NOT_SEND_TO_PSX': [ 'Tla' ],
The error carrot is pointing to the ":".
My code is -

CONFIG_MISC = {
    'THROTTLE_SYNC_SOUND': "C:/Aerowinx/Audio/Basics/cab1.wav"
   'DO_NOT_SEND_TO_PSX': [ 'Tla' ],
}
Grace and Peace,

Bode

B747-400

Missing comma in second line ...wav",

BR
Hans

Bluestar

Macro.

This is where I am.  The gear works, but no sound for the throttle sync. 

# -*- mode: Python;-*-
# pylint: disable=invalid-name,missing-module-docstring

CONFIG_MISC = {
    'THROTTLE_SYNC_SOUND': "C:/Aerowinx/Audio/Basics/cab1.wav",
   'DO_NOT_SEND_TO_PSX': [ 'Tla' ],
}
CONFIG = {
    'PFC Throttle Quadrant Console': {
        'button down': {
            # Gear lever UP
            1: {
                'button type': 'SET',
                'psx variable': 'GearLever',
                'value': 1,
            },
            # Gear lever DOWN
            2: {
                'button type': 'SET',
                'psx variable': 'GearLever',
                'value': 3,
            },
        },
        'button up': {
            0: {
                'button type': 'SET',
                'psx variable': 'GearLever',
                'value': 2,
            },
            1: {
                'button type': 'SET',
                'psx variable': 'GearLever',
                'value': 3,
            },
   },
   'axis motion': {         
   2: {
                # Lever 2 controls Engine 1
                'axis type': 'AXIS_PSX_THROTTLE',
                'psx variable': 'Tla',  # required, and must be Tla
      'axis swap': False,
      'axis min': -0.99,
      'axis max': 0.99,
      'psx idle': 0,
                'psx full': 5000,
               'engine indexes': [0, ],
           },
       },   
   },
}
Grace and Peace,

Bode

macroflight

Does C:/Aerowinx/Audio/Basics/cab1.wav exist?

I'm not 100% sure Python under Windows will accept the forward slashes, I would replace them with backslashes just to be on the safe side.

Anything relevant shown if you run it with the --debug option?

(And yes, throttle sync sound worked for me when I tested the DO_NOT_SEND_TO_PSX change)

Hardy Heinlin

Aerowinx/Audio/Basics/cab1.wav is a telephone tone in the cabin call system.

Bluestar

Quote from: macroflight on Thu, 11 Sep 2025 19:52Does C:/Aerowinx/Audio/Basics/cab1.wav exist?

I'm not 100% sure Python under Windows will accept the forward slashes, I would replace them with backslashes just to be on the safe side.

Anything relevant shown if you run it with the --debug option?

(And yes, throttle sync sound worked for me when I tested the DO_NOT_SEND_TO_PSX change)


Macro,

I made the change with the following result -

frankenusb-frankensim.conf:5: SyntaxWarning: invalid escape sequence '\A'
  'THROTTLE_SYNC_SOUND': "C:\Aerowinx\Audio\Basics\cab1.wav",

I then added a "r" -

CONFIG_MISC = {
    'THROTTLE_SYNC_SOUND': r"C:\Aerowinx\Audio\Basics\cab1.wav",
    'DO_NOT_SEND_TO_PSX': [ 'Tla' ],
}

No more syntax warning and the gear still works, but no sound.  There has to be something simple, I just haven't figured it out yet. rofl
Grace and Peace,

Bode

macroflight

Quote from: Bluestar on Fri, 12 Sep 2025 14:28No more syntax warning and the gear still works, but no sound.  There has to be something simple, I just haven't figured it out yet. rofl
I will suggest something very simple then. Are you testing with the autothrottle active (i.e the left-most FMA field on the PFD is showing something other than nothing or HOLD)?

The throttle sync sound plays when the USB throttle is moved, the autothrottle is active and the USB throttle position is close (less than 100 units on the PSX scale, which goes from -8925 to 5000) to the PSX throttle position.

If the sound file does not exist, you should get an error "<file> missing, cannot play throttle sync sound".

Bluestar

Quote from: macroflight on Fri, 12 Sep 2025 17:52I will suggest something very simple then. Are you testing with the autothrottle active (i.e the left-most FMA field on the PFD is showing something other than nothing or HOLD)?

The throttle sync sound plays when the USB throttle is moved, the autothrottle is active and the USB throttle position is close (less than 100 units on the PSX scale, which goes from -8925 to 5000) to the PSX throttle position.

If the sound file does not exist, you should get an error "<file> missing, cannot play throttle sync sound".

Macro,

I got it working today.  The only change I made was adding -8925 to the PSX idle. It was originally 0. 

My flying technique on landings is to be in FLCH once I descend below 10,000 msl.  For me the upper left FMA window is in SPEED. 

Thanks for your help. 
Grace and Peace,

Bode