Page 22 of 74 FirstFirst ... 121819202122232425263272 ... LastLast
Results 211 to 220 of 737
  1. #211
    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

    Hi,
    that code was a sample, but that don´t work correct.
    The first thin is you cant work with the full frequenz, the FS dont understand that.
    118.000 = wrong
    18.000 = right

    Use my working Code from my post.

    Stefan

  2. #212
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    239
    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

    your code didnt work for me it helped but didnt work. So then i tried instead and now i only get 14*.** so yeah



    case C_COM1DISPLAY:
    x = BCD2Int(COM1);
    x += val*5;
    if (x > 3697)
    x = 3697;
    if (x < 1800)
    x = 1800;
    COM1 = Int2BCD(x);
    FsWrite (FS_RADIOSTACKCOM1, (COM1));
    FsbusWrite (C_COM1DISPLAY, x);
    break;

    case FS_RADIOSTACKCOM1:
    // main 3 digits, in Binary Coded Decimal.
    // A frequency of 1234.5 will have 0x0234 here
    // and 0x0105 in offset 0356.
    x = val;
    COM1 = (COM1) | (x);
    FsbusWrite (C_COM1DISPLAY, BCD2Int(COM1)+10000);
    break;

  3. #213
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    239
    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 so playing with it more looks like if i start out with

    FS Freq FSBUS Dis Freq
    118.00 118.00
    118.02 118.02
    118.00 118.02
    118.05 118.05
    118.00 118.05
    118.10 118.15
    118.17 118.17
    122.20 140.97

    Seems like the highest digit that it shows it will only display that but wont ever go lower. But then when i went to the 122 freqs it jumped to the 140 freq range so yeah im not sure on where to go from here.

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

    Hi,
    that part of the code has one error.

    x += val*5;

    The COM Radion has no 5 as stepsize. It is 25. Your code if for NAV.

    Code like that will fix that.
    Code:
    			x2=comstby/10;
    			x2=x2*10;
    			x1=comstby-x2;
    			comstby = comstby *10;
    			if((x1==2) | (x1==7))
    			comstby+= 5;
    		    comstby += val * 25;
    			x3=comstby;
    			x3/=10;
    			comstby=x3
    Stefan

  5. #215
    75+ Posting Member cscotthendry's Avatar
    Join Date
    Dec 2006
    Location
    Russell Island Australia
    Posts
    127
    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 388TH_A View Post
    your code didnt work for me it helped but didnt work. So then i tried instead and now i only get 14*.** so yeah



    case C_COM1DISPLAY:
    x = BCD2Int(COM1);
    x += val*5;
    if (x > 3697)
    x = 3697;
    if (x < 1800)
    x = 1800;
    COM1 = Int2BCD(x);
    FsWrite (FS_RADIOSTACKCOM1, (COM1));
    FsbusWrite (C_COM1DISPLAY, x);
    break;

    case FS_RADIOSTACKCOM1:
    // main 3 digits, in Binary Coded Decimal.
    // A frequency of 1234.5 will have 0x0234 here
    // and 0x0105 in offset 0356.
    x = val;
    COM1 = (COM1) | (x);
    FsbusWrite (C_COM1DISPLAY, BCD2Int(COM1)+10000);
    break;
    Hi:

    I don't know much about FSBus, but I do know a little about C++, so I'll have a little stab at this for you. There is a line that makes me a little suspicious about the fault that you report. The fault that I think you're reporting is that when you increase from 118.00 to 118.02 and then go back to 118.00 the display stays at 118.02. The line I am suspicious of is
    COM1 = (COM1) | (x);
    In this statement, you are logically ORing the new value with the old value. Without going into a lesson on boolean logic, I think this line is preserving the higher values. What happens if you just use
    COM1 = x;
    ???
    Regards: Scott Hendry
    www.scotthendry.com

  6. Thanks RobiD, 388TH_A thanked for this post
  7. #216
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    239
    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 cscotthendry View Post
    Hi:

    I don't know much about FSBus, but I do know a little about C++, so I'll have a little stab at this for you. There is a line that makes me a little suspicious about the fault that you report. The fault that I think you're reporting is that when you increase from 118.00 to 118.02 and then go back to 118.00 the display stays at 118.02. The line I am suspicious of is
    COM1 = (COM1) | (x);
    In this statement, you are logically ORing the new value with the old value. Without going into a lesson on boolean logic, I think this line is preserving the higher values. What happens if you just use
    COM1 = x;
    ???
    WOW that was the problem and now it works just fine with no ERRORS THANK YOU SO MUCH!!!

  8. #217
    75+ Posting Member cscotthendry's Avatar
    Join Date
    Dec 2006
    Location
    Russell Island Australia
    Posts
    127
    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

    Glad I could help.
    Regards: Scott Hendry
    www.scotthendry.com

  9. #218
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    239
    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

    For the Avionics Bus Volt. 0x2850 FLT64 8 Bit Do you know if i can use this in my project? In FS Interrogate I can get it to show the value that its getting from the FS but it also says in it that NOT FSUIPC SUPPORTED but yet it does get a value from the FS so again do you know if i can use this or not?

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

    You can use that.
    What are your intentions with that Offset?
    I use them to switch off my cockpit.

    Stefan

  11. #220
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    239
    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 same was wanting to add it into the C++ to turn off my radio stack only

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