Page 61 of 74 FirstFirst ... 115157585960616263646571 ... LastLast
Results 601 to 610 of 737
  1. #601
    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

    that is the point i canīt help. Nomaly i start the debuger than you se what happends.
    I is only math, you need to find the right calculation.

    Stefan

  2. #602
    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

    Thanks Stefan. I'll battle on. I have one more question.

    Using your little motor testing code, it takes 2355 to make the rose go around 360deg. Does this mean that there is 2355 steps in 360degs? If so, it changes the code I'm working on drastically.

    Here's my code to turn the rose 360 just so you're clear on what I mean.

    FsbusWriteFmtVar(30,80,0);
    FsbusMux(2000);
    FsbusWriteFmtVar(30,80,2355);
    FsbusMux(8000);
    FsbusWriteFmtVar(30,80,0);
    FsbusMux(8000);

  3. #603
    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

    Thatīs right

  4. #604
    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

    Stefan,

    I am getting this error now:

    Run-Time Check Failure #2 - Stack around the variable 'buf' was corrupted.

    From reading, and if I understand correctly, is this a problem with the dll, or my code.

    It seems to be around the ADF needle code. When I tune the ADF, it is ok for a while, then produces this error.
    Any idea what it's telling me?

    Thanks
    David

  5. #605
    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

    do you named a variable 'buf' ?

  6. #606
    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

    No. I have no variable "buf".

    Doing a little research, this type of error seems to indicate that something is being written to the wrong address, or something is not being cleared from that address before more data is being written to the same address.

    I'm probably completely off track with my understanding.

    David

  7. #607
    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 Thanks.

    On Feb. 19 i have a meeting with Dirk and Rob is will that error message to my todo list.
    Please count the errors and try to find the situation to generate the error.

    Stefan

  8. #608
    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

    Will do. I'll try to give you as much info as possible.

  9. #609
    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

    So it's around this piece of code

    Code:
    case FS_ADF1RELATIVEBEARING:
    				printf("Data in: %d\n",val);
    				ADF1RelNeedleMulti = (1000 * ADF1RelNeedleDeg) / ADF1RelNeedleStep;
    				ADF1RelDataIn = val + 32780;
    				if (ADF1RelDataIn >=0)
    				{
    					ADF1RelDataIn = (ADF1RelDataIn+1);
    				}
    				ADF1RelDataDif = ADF1RelDataIn - ADF1RelDataSave;
    				ADF1RelNeedleDif = ADF1RelNeedleMulti / ADF1RelDataDif;
    				ADF1RelNeedlegoto = ADF1RelNeedleSave + ADF1RelNeedleDif;
    				FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto/1000);
    				printf("Relative Bearing %d\n",ADF1RelNeedlegoto/1000);
    				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;

    This bit in particular:
    FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto/1000);
    printf("Relative Bearing %d\n",ADF1RelNeedlegoto/1000);

    With the /1000, the printf data stays at 0 to 4.
    If I delete the /1000 I now get some useful figures, but it triggers the error. The error is produced even if I try /10, /100

    Hope that give some useful info.

    Let me know what the follow up is of the meeting.

    Thanks
    David

  10. #610
    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

    Quote Originally Posted by RobiD View Post
    This bit in particular:
    FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto/1000);
    printf("Relative Bearing %d\n",ADF1RelNeedlegoto/1000);

    With the /1000, the printf data stays at 0 to 4.
    If I delete the /1000 I now get some useful figures, but it triggers the error. The error is produced even if I try /10, /100
    The problem is i canīt see what is inside of all the other variables that we use in the case.
    Solution one, make a printf with all variables.
    Solution two, we look together to the code/debuger with Teamviewer.

    Stefan

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