Results 1 to 7 of 7
  1. #1
    75+ Posting Member
    Join Date
    Jun 2011
    Location
    FRANCE
    Posts
    121
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Problem with rudder control

    Hello,

    I have a problem with my rudder control. My ailerons, tiller and elevator are controled with potentiometers via PSXseecon. My rudder is controled with a USB device. There is no other device interacting with the rudder. My rudder is always reset to center position when I try to move it with my pedals. Hardy says the problem doesn't comes from PSX.

    I investigated a little bit and I found that only declaring variables 3708 and 3709 (as static) in my SIOC script, without any other action causes the problem. If I put the declarations of variables 3708 and 3709 out of my SIOC script, I lose the ailerons and elevator control, but the rudder is working fine. I think about a problem with the Qs120 handling, and/or data split, or processing (elevator / rudder / ailerons) to 3708, 3709, 3710 PSXseecon variables. Something is reseting the rudder position to center. Could you please investigate ? Here is my code if you want to check :

    Code:
    Var 3708, name Elevator, static     // ELEVATOR STICK (PSX)
    
    
    Var 8908, name CpElevatorPot, Link IOCARD_ANALOGIC, Device 1, Input 1, PosL 57, PosC 134, PosR 208     // CP ELEVATOR POT
    {
      L0 = &LastCpElevPot - 3
      L1 = &LastCpElevPot + 3
      C0 = &CpElevatorPot < L0
      C1 = &CpElevatorPot > L1
      IF C0 OR C1
      {
        L0 = &CpElevatorPot - 27
        L0 = L0 * 8
        &Elevator = L0 - 800
        &LastCpElevPot = &CpElevatorPot    
      }
    }
    
    
    Var 8910, name LastCpElevPot, Value 0     // LAST CP ELEVATOR POT VALUE
    
    
    Var 3709, name Ailerons, static     // AILERONS CONTROL
    
    
    Var 1426, name Tiller, static     // TILLER (PSX)
    
    
    Var 8909, name CpAileronsPot, Link IOCARD_ANALOGIC, Device 1, Input 2, PosL 17, PosC 105, PosR 185     // CP AILERONS & TILLER POT
    {
      L0 = &LastCpAilPot - 3
      L1 = &LastCpAilPot + 3
      C0 = &CpAileronsPot < L0
      C1 = &CpAileronsPot > L1
      IF C0 OR C1
      {
        L0 = &CpAileronsPot - 27
        L0 = L0 * 8
        &Ailerons = L0 - 800
        &Tiller = L0 - 800
        &LastCpAilPot = &CpAileronsPot    
      }
    }
    
    
    Var 8911, name LastCpAilPot, Value 0     // LAST CP AILERONS & TILLER POT VALUE
    Cheers,
    Regards,
    Jean-philippe

  2. #2
    75+ Posting Member
    Join Date
    Jun 2011
    Location
    FRANCE
    Posts
    121
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with rudder control

    Hi Nico,

    Below is the quote from PSX forum where I asked Hardy about this problem. I think he points me in the right direction. I think I can implement this store/re-inject rudder value by modifying my SIOC script. I just have to declare 3710 in my script. I'll give it a try as soon as possible and report. Maybe you could improve PSXseecon by doing this task automatically. If the user only declare, say, 3708, PSXseecon could store automatically values of 3709 and 3710 and re-inject these values within Qs120 every time 3708 is modified.

    Hardy Heinlin said in PSX forum :

    When you inject aileron and elevator data via network into PSX, you write something like:

    456;32;0

    The last value is the rudder value. If you inject 0, the rudder will go to zero.

    When your USB moves the rudder, PSX sends to your add-on something like:

    456;32;777

    When your add-on receives this, your add-on should store the value 777 and use it when you send the next aileron/elevator event to PSX. E.g. when your aileron moves to 999 and your elevator stays at 32 or whatever, don't send this:

    999;32;0

    But send this:

    999;32;777

    Attach 777 or whatever the latest rudder position is.



    Nevertheless, I just modified PSX slightly because I noticed a momentary flicker to zero when using mixed USB and network inputs for those three flight controls. I don't think this will fix your problem (because I think the problem lies in your code), but it may improve the smoothness.


    Regards,

    |-|ardy
    Here is the link to the complete thread :

    http://aerowinx.com/forum/topic.php?...6180#post26180

    Cheers,
    Regards,
    Jean-philippe

  3. #3
    75+ Posting Member
    Join Date
    Jun 2011
    Location
    FRANCE
    Posts
    121
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with rudder control

    I tried to only declare variable 3710 in my script. It doesn't change anything. I think you have to implement a new Qs120 handling for people using a mix of USB devices and direct network injections for flight controls. For this purposes, PSXseecon needs to read the actual rudder value within Qs120, store it within a temp variable, and re-inject this rudder value at every Qs120 injection by PSXseecon.

    Regards,
    Regards,
    Jean-philippe

  4. #4
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with rudder control

    Hi Jean-Philippe,
    Interesting problem.

    Quote Originally Posted by Jean-philippe View Post
    PSXseecon needs to read the actual rudder value within Qs120, store it within a temp variable, and re-inject this rudder value at every Qs120 injection by PSXseecon.
    Implemented in version 1.4.7, I think

    Please try.

    Cheers,
    Nico

  5. #5
    75+ Posting Member
    Join Date
    Jun 2011
    Location
    FRANCE
    Posts
    121
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with rudder control

    Hi Nico,

    I tested the new version of PSXseecon and my rudder is working like a charm now. Thank you very much !
    Regards,
    Jean-philippe

  6. #6
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with rudder control

    Hi JP,
    Quote Originally Posted by Jean-philippe View Post
    Thank you very much !
    Thank you for pointing me to this problem.

    Nico

  7. #7
    75+ Posting Member
    Join Date
    Jun 2011
    Location
    FRANCE
    Posts
    121
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Problem with rudder control

    Debug team @ your service
    Regards,
    Jean-philippe