Page 63 of 74 FirstFirst ... 135359606162636465666773 ... LastLast
Results 621 to 630 of 737
  1. #621
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    ok, i will be there.

  2. #622
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    David,

    if you finished the code please post them.
    The version here has the 2 bugs.

    Stefan

  3. #623
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Hi Stefan,

    Thank you again for your time.

    I'll post the code as it stands now.

    I checked the number of steps in 360 deg and now have 1150. I have adjusted the code accordingly. The needle is still moving much further than the needle in FSX, so I may need to divide the final output to get the right number of steps.

    Also, how does this gauges sync with FSX?

    Code:
    static int ADF1RelDataIn;
    static int ADF1RelDataSave;
    static int ADF1RelDataDif;
    
    static int ADF1RelNeedlegoto;
    static int ADF1RelNeedleSave;
    static int ADF1RelNeedleDif;
    float ADF1RelNeedleMulti;
    //static int ADF1RelNeedleMulti;
    static int ADF1RelNeedleDeg = 360;
    //static int ADF1RelNeedleStep = 2355;
    static int ADF1RelNeedleStep = 1150;
    
    
    case FS_ADF1RELATIVEBEARING:
    				printf("Data in: %d\n",val);
    				ADF1RelNeedleMulti = ADF1RelNeedleStep/ADF1RelNeedleDeg;
    				//ADF1RelNeedleMulti = ADF1RelNeedleDeg / ADF1RelNeedleStep;
    				//ADF1RelNeedleMulti = ADF1RelNeedleDeg) / ADF1RelNeedleStep;
    				ADF1RelDataIn = val + 32780;
    				if (ADF1RelDataIn >=0)
    				{
    					ADF1RelDataIn = (ADF1RelDataIn+1);
    				}
    				ADF1RelDataDif = ADF1RelDataIn - ADF1RelDataSave;
    				ADF1RelNeedleDif = ADF1RelDataDif / ADF1RelNeedleMulti;
    				ADF1RelNeedlegoto = ADF1RelNeedleSave + ADF1RelNeedleDif;
    				FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto);
    				printf("Relative Bearing: %d NeedleDif: %d NeedleSave: %d\n",ADF1RelNeedlegoto, ADF1RelNeedleDif, ADF1RelNeedleSave);
    				ADF1RelNeedleSave = ADF1RelNeedlegoto;
    				ADF1RelDataSave = ADF1RelDataIn;
    				//printf("ADF1RelNeedleMulti: %d\n",ADF1RelNeedleMulti);
    				//printf("ADF1RelNeedleDeg: %d\n",ADF1RelNeedleDeg);
    				//printf("ADF1RelNeedleStep: %d\n",ADF1RelNeedleStep);
    				//printf("ADF1RelDataIn: %d\n",ADF1RelDataIn);
    				//printf("ADF1RelDataDif: %d\n",ADF1RelDataDif);
    				//printf("ADF1RelNeedledif: %d\n",ADF1RelNeedlegoto);
    				break;

  4. #624
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    The needle is still moving much further than the needle in FSX, so I may need to divide the final output to get the right number of steps.
    Not devide only subtract. Is the differenc always the same?

    You can also change float ADF1RelNeedleMulti; to static int ADF1RelNeedleMulti;.

  5. #625
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    I am getting an error message on compiling.

    I'm not in front of my FSX computer, but it is something about converting int to double (or the other way around) and some data may be lost.

    The difference does seem to be consistent.

    What changes will occur changing the float bact to a static int?

    Thanks

  6. #626
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    I would be substracting from the FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto); line.

    So could I write something like this just as an example:

    FsbusWriteFmtVar(29,80,(ADF1RelNeedlegoto - 100));

  7. #627
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    I am getting an error message on compiling.

    I'm not in front of my FSX computer, but it is something about converting int to double (or the other way around) and some data may be lost.

    The difference does seem to be consistent.

    What changes will occur changing the float bact to a static int?

    Thanks
    In the devision you have a resoult with ,xxx that is not possible with int.
    Let is as flot, it is ok.

    So could I write something like this just as an example:

    FsbusWriteFmtVar(29,80,(ADF1RelNeedlegoto - 100));
    Right! But only in case that the differenz is always the same.

    Stefan

  8. #628
    150+ Forum Groupie
    Join Date
    Mar 2009
    Location
    South Africa
    Posts
    221
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Ok i have a problem - the same that has always plagued me. I had modified 12way rotary switches for "encoders" and they worked well. BUT - what i found was that from time to time i would turn them and then suddenly they "lost" their settings and just increased the value either way it was turned so i had to go into FSBUS and digital IN settings and reset it to be a 4 tep or whatever.

    I got a prompt from Stefan to change the BO bits which i did to 4v. Then i also bought some proper encoders which work GREAT! and they are smooth and are absolutely fantastic. BUT - here is the problem again!!

    I will be using my MCP and it works like a charm but then at some stage i will start to change the CRS once i know which runway i will be using and i start turning the encoder then what happens - while i turn it it seems the digits "stick" and then eventually stop changing and then i have to go into FSBUS again Digital IN and set it again to an encoder!!

    This happens almost all the time. SO i thought my problem was sorted and spent more money (not a problem as it is better) but my problem remains and i have to keep resetting the rotaries so they act properly.

    I don't want to even think about having to constantly reset my switches etc so they work each time i want to fly.

    I have even re flashed the 8535 and set the bits etc a couple of times and doesn't seem to fix this. I am lost!

    Sean

  9. #629
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Can you try a new 8535?

  10. #630
    150+ Forum Groupie
    Join Date
    Mar 2009
    Location
    South Africa
    Posts
    221
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Quote Originally Posted by sgaert View Post
    Can you try a new 8535?
    Hi Stefan

    Yes i have a spare in my box. Guess just the mission to pull the other one our hahaha without damaging it.

    Thanks for yuor fast response

Similar Threads

  1. Fsbus CDK
    By flyandre in forum General Builder Questions All Aircraft Types
    Replies: 4
    Last Post: 12-27-2014, 12:58 PM
  2. Need Help Getting My FSBUS NG I/O Going Again..
    By JBRoberts in forum I/O Interfacing Hardware and Software
    Replies: 14
    Last Post: 03-21-2010, 01:38 PM
  3. Fsbus ng io
    By Davral in forum I/O Interfacing Hardware and Software
    Replies: 0
    Last Post: 01-10-2009, 10:38 PM
  4. Fsbus 2.4.3
    By Anderson/SBSP in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 11-30-2008, 04:25 PM
  5. Help FSBUS
    By cesarfsim in forum I/O Interfacing Hardware and Software
    Replies: 2
    Last Post: 10-26-2008, 02:23 PM

Tags for this Thread