Results 1 to 2 of 2
  1. #1
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Procedure to use TOGGLE variables

    Hi Nico,

    Can you give me a clue for the proper procedure to use TOGGLE variables?

    I started off doing this:

    ' 582 &H9246 37446 IRS keypad 1 <-- Comment
    dwOffset = 37446: bytData = 1: Call WriteFSXbyte(dwOffset, bytData)
    dwOffset = 37446: bytData = 0: Call WriteFSXbyte(dwOffset, bytData)
    Call ProcessFSX
    - write byte ON at offset x9246.
    - write byte OFF at offset x9246.
    - issue FSUIPC Process request.

    Nothing happens when I try to enter coordinates on the IRS.


    So far I've done all my work by trial and error based and that takes forever. This is what I have so far:



    I have some tweaking left to do; turning off the IRS system when there is no power available, enabling that countdown timer when the IRUs are aligning, finalizing Track (some confusion about this).

    Robert

  2. #2
    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: Procedure to use TOGGLE variables

    Hi Robert,
    Every time a toggle value changes value, either from 1 to 0 or from 0 to 1, lekseecon will generate the LevelD command.

    In your example you combine two writes...so at the end nothing will change. You should put a FSUIPC_Process in between, like this

    - write byte ON at offset x9246.
    - issue FSUIPC Process request.
    wait at least 300 msec
    - write byte OFF at offset x9246.
    - issue FSUIPC Process request.

    AND you should put some delay in between.. Humans do not type that fast you know


    Nico