Page 69 of 75 FirstFirst ... 1959656667686970717273 ... LastLast
Results 681 to 690 of 746
  1. #681
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    433
    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
    Next try.

    Code:
    static int ADF1RelDataIn;
    static int ADF1RelDataSave;
    static int ADF1RelDataDif;
    static int ADF1RelNeedlegoto;
    static int ADF1RelNeedleSave;
    static int ADF1RelNeedleDif;
    static int ADF1RelNeedleDeg = 65536;
    float ADF1RelNeedleMulti;
    //static int ADF1RelNeedleStep = 1150;
    static int ADF1RelNeedleStep = 1400;
    
    case FS_ADF1RELATIVEBEARING:
    					printf("Data in: %d\n",val);
    					ADF1RelNeedleMulti = ADF1RelNeedleDeg/ADF1RelNeedleStep;
    					
    					ADF1RelDataDif = ADF1RelDataIn - ADF1RelDataSave;
    					
    					if ( ADF1RelDataDif > ADF1RelNeedleDeg/2)
    						ADF1RelDataDif = ADF1RelNeedleDeg-ADF1RelDataDif;
    					else if (ADF1RelDataDif < (ADF1RelNeedleDeg/2 * -1))
    						ADF1RelDataDif = ADF1RelNeedleDeg+ADF1RelDataDif;
    
    					printf("ADF1RelDataDif: %d\n",ADF1RelDataDif);
    					ADF1RelNeedleDif = ADF1RelDataDif / ADF1RelNeedleMulti;
    					ADF1RelNeedlegoto = ADF1RelNeedleSave + ADF1RelNeedleDif;
    					FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto);
    					printf("ADF1RelNeedlegoto: %d\n",ADF1RelNeedlegoto);
    					ADF1RelNeedleSave = ADF1RelNeedlegoto;
    					ADF1RelDataSave = ADF1RelDataIn;
    					printf("ADF1RelNeedleDif: %d\n",ADF1RelNeedleDif);
    					
    					break;
    please fly 1x 360 left and 1x 360 right and report the datalog.
    Hi Stefan,

    Sorry had to go out for a while.

    I'll do this now and report back. Should take about 15 mins to boot everything up, change the code etc.

    David

  2. #682
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    433
    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, this is with the new code you have just given me:

    (Oh, there was no needle movement on my stepper gauges)


    Data in: -26469
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -26686
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -26907
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -27437
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -27654
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -27907
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -28124
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -28589
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -28806
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -29023
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -29466
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -29683
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -29900
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -30293
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -30473
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -30726
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -31033
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -31255
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -31508
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -31689
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -32001
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -32217
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -32434
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: -32709
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 32602
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 32384
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 32178
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 31953
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 31736
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 31522
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 31296
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 31072
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 30916
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 30724
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 30459
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 30329
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 30106
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 29853
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 29636
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 29481
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 29255
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 29037
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 28941
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 28722
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 28512
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 28408
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 28196
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 28005
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27960
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27776
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27598
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27568
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27415
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27259
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27277
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27145
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 27024
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26910
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26968
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26848
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26770
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26841
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26756
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26691
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26801
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26747
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26725
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26816
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26785
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26765
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26900
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26887
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26882
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0
    Data in: 26965
    ADF1RelDataDif: 0
    ADF1RelNeedlegoto: 0
    ADF1RelNeedleDif: 0

  3. #683
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    325
    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

    Strange, can you start teamviewer and skype?

  4. #684
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    325
    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

    haha
    big fault add that line as first line in the case

    ADF1RelDataIn = val;

  5. #685
    150+ Forum Groupie
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    227
    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 Guys,

    I just want to know if you have made some progress with version 3 of the dll=
    I.e. the flap gauge with a steppenmotor.

    Best regards

    Jan Geurtsen

  6. #686
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    325
    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 Jan,

    i used a Servo.

    Stefan

  7. #687
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    433
    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 everyone,

    Well it's been a while since I've been here or posted.

    After completing my sim (well about 99%) which took over 6 years, I spent a couple of months flying it.

    I have now spent the last few weeks dismantling it all. I now have a garage again (it makes my wife happy as it's now also her office).

    I intend to build a fixed platform generic cockpit in the near future, but far less elaborate than the 2 DOF fully enclosed monster I built, that could only be moved on a very large tandem axle trailer, and only fitted one person inside. (bit boring not being able to share the experience).

    I absolutely enjoy and respect this community and will keep you updated on my progress over time.

    I would also like to thank Stefan for his patience and unwavering support and assistance.

    Speak to you all soon.

    David

  8. #688
    75+ Posting Member
    Join Date
    Jan 2012
    Location
    Bexleyheath,Kent UK
    Posts
    102
    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 RobiD View Post
    Ok, after much testing, here is the solution!!!


    Add this at the top with the rest of the static int:

    Code:
    static   int    GlideslopeHold   = 0;
    Then uncomment out:
    Code:
    MkFsObject(FS_AP_GLIDESLOPEHOLD,  "",cbModecontrolpanel, 0x07FC, 4,  TP_UI32,  FS_NORMAL, 0);
    Then change this:
    Code:
    case C_SAPP:
    				            if (val == 0) // button push only
                {
                    ApproachHold = (ApproachHold == 0) ? 1 : 0; // toggle
                    FsWriteInt(FS_AP_APPROACHHOLD, ApproachHold);
    				            }
                break;
    to this:

    Code:
    case C_SAPP:
                if (val == 0) // button push only
                {
                    ApproachHold = (ApproachHold == 0) ? 1 : 0; // toggle
                    FsWriteInt(FS_AP_APPROACHHOLD, ApproachHold);
    				GlideslopeHold = (GlideslopeHold == 0) ? 1 : 0;
    				FsWriteInt(FS_AP_GLIDESLOPEHOLD, GlideslopeHold);
                }
                break;
    Have tested and works for me.

    Let me know if it works for you too.

    David
    Hi David

    Do you still frequent this forum?

    Would greatly appreciate your help re the code here..I too have the exact same problem in FSBUS but am using the CDK not dll.

    John
    Old, tired & broke (shouldn't be allowed out really)

  9. #689
    75+ Posting Member
    Join Date
    Jan 2012
    Location
    Bexleyheath,Kent UK
    Posts
    102
    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

    An Update

    I have bitten the bullet and hope to go the FSBUS DLL route although I have no programmer DNA whatsoever..

    I have looked at a few examples of .h and .cpp and they seem to contradict the stuff in the fsbus dll "manual" or at least Icannot see the relationship.

    Just an update

    John
    Old, tired & broke (shouldn't be allowed out really)

  10. #690
    10+ Posting Member
    Join Date
    Apr 2009
    Location
    Squillace
    Posts
    20
    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

    Hello,

    I need to set 7 segments display value to show dash lines "---".

    How to set it in Fsbus?

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, 02: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, 03:23 PM

Tags for this Thread