Page 73 of 74 FirstFirst ... 2363697071727374 LastLast
Results 721 to 730 of 737
  1. #721
    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

    Hi 388TH_A

    Sorry to hear about having to start over...oh the tedium of it all....

    But welcome "back"

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

  2. #722
    150+ Forum Groupie


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

    LOL I found a working copy on my computer that I was given back in 2010 from RVDB737NG Copyright(c)2009, Rob van Dijk - www.rvdijk.nl Now im just trying to change it up and make it my own.

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

    Phew!

    I also have just about all of Robs original files..let me know if you cant find anything ...What cockpit are you working on?

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

  4. #724
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    238
    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 now im doing my radios and autopilot then might try and make it around a 737-800

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

    Ah same here (737-800) although as I am building mine Its going in bubble wrap as we aim to move house in a few months.

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

  6. #726
    150+ Forum Groupie


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

    1( Working on the Pedestal the freqs will only count up when ever I turn the Rotary Knobs

    Code:
    /*---------------------- COM1 Events ----------------------*/
    
    		case FS_COM1FREQUENCY:
    				Com1Fr = ((10000 + BCD2Int(val)) * 10 + 5) / 25 * 25; // rounded, units: 0.001
    				FsbusWrite(C_DCOM1, Com1Fr / 10); // to cockpit
                break;
    		case FS_COM1STANDBY:
    				Com1FrStb = ((10000 + BCD2Int(val)) * 10 + 5) / 25 * 25;
    				FsbusWrite(C_DCOM1STB, Com1FrStb / 10);	// to cockpit
                break;		
            case C_RCOM1DEC:
    				x = Com1FrStb %1000;
    				x = x + 25 * val; // in steps of 0.025
                if (x > 975) // upper limit: 0.975
                    x = 0;
                else if (x < 0)
                    x = 975;
    				Com1FrStb = Com1FrStb / 1000 * 1000 + x; // units: 0.001
    				FsbusWrite(C_DCOM1STB, Com1FrStb / 10);	// truncated to 0.01
    				x = Int2BCD((Com1FrStb % 100000) / 10);	// stripped and truncated to 0.01
    				FsWrite(FS_COM1STANDBY, x);	// to FS
                break;
            case C_RCOM1FRA:
    				x = Com1FrStb / 1000; // ahead of dec point
    				x = x + val; // in steps of 1.000
                if (x > 136)
                    x = 118;
                else if (x < 118)
                    x = 136;
    				Com1FrStb = x * 1000 + (Com1FrStb % 1000);
    				FsbusWrite(C_DCOM1STB, Com1FrStb / 10);
    				x = Int2BCD((Com1FrStb % 100000) / 10);
    				FsWrite(FS_COM1STANDBY, x);
                break;
    		case C_SCOM1SWAP:
    			if(val==0)
    				FsWrite (FS_RADIOUSESTBYTOGGLE,0x08); // toggle bit 3 (COM1)
    		    break;
    		case C_SCOM1TEST:
                break;
    2) for the 737NGX Transponder there are Five positions for the Knob but cant seem to find the offset for them


    Code:
    		case C_SXPNDRIDENT:            break;
            case C_SXPNDRCTRL1:
                break;
            case C_SXPNDRCTRL2:
                break;
            case C_SXPNDRCTRL3:
                break;
            case C_SXPNDRCTRL4:
                break;
            case C_SXPNDRCTRL5:
                break;

    3) The ADF1STBY Freq doesnt seem to show the correct Freq. And the Value I do get is 0x0000

    Code:
    MkFsObject(FS_EXTENDEDADF1,        "OID", EventHandler, 0x0356, 2, TP_UI16, FS_NORMAL);
    
    case FS_ADF1FREQUENCY:
    				ADF1 = (ADF1 / 10000) * 10000 + BCD2Int(val) * 10 + ADF1 % 10;
    				FsbusWrite(C_DADF1, ADF1);
                if (bSynchronised == false) 
                {
                    ADF1Stb = ADF1;
                    FsbusWrite(C_DADF1STB, ADF1Stb);
                }
                break;
    		case FS_EXTENDEDADF1:
    				ADF1 = BCD2Int(val >> 8) * 10000 + ((ADF1/10)%1000)*10 + BCD2Int(val & 0x00FF);
    				FsbusWrite(C_DADF1, ADF1);
                if (bSynchronised == false) 
                {
    				ADF1Stb = ADF1;
    				FsbusWrite(C_DADF1STB, ADF1Stb);
                }
                break;
    		case C_RADF_100:
    				x = ADF1Stb / 1000;	// hundreds
    				x = x + val; // update 100s
                if (x > 17)
                    x = 1; // wrap
                else if (x < 1)
                    x = 17;	// wrap
    				ADF1Stb = x * 1000 + ADF1Stb % 1000; // new 100s
    				FsbusWrite(C_DADF1STB, ADF1Stb);
    			break;
            case C_RADF_10:
    				x = (ADF1Stb % 1000) / 10; // tens + units
    				x = x + val; // update 10s
                if (x > 99)
                    x = 0; // wrap
                else if (x < 0)
                    x = 99;	// wrap
    				ADF1Stb = (ADF1Stb / 1000) * 1000 + x * 10  + ADF1Stb % 10; // new 10s
    				FsbusWrite(C_DADF1STB, ADF1Stb);
    			break;
            case C_RADF_1:
    				x = ADF1Stb % 10; // .1 units
    				x = x + val; // update 10s
                if (x > 9)
                    x = 0; // wrap
                else if (x < 0)
                    x = 9; // wrap
    				ADF1Stb = (ADF1Stb / 10) * 10 + x;        
    				FsbusWrite(C_DADF1STB, ADF1Stb);
    			break;
            case C_SADFSWAP:
                if (val == 0)
                {
                    x = ADF1Stb; // save
                    ADF1Stb = ADF1;	// swap
                    ADF1 = x; // swap
                    x = Int2BCD(ADF1); // convert to bcd
                    FsWrite(FS_EXTENDEDADF1, ((x & 0x0F0000) >> 8) | (x & 0x00000F));
                    FsWrite(FS_ADF1FREQUENCY, (x & 0x00FFF0) >> 4);
                    FsbusWrite(C_DADF1STB, ADF1Stb);
                }
    			break;		
    		case FS_ADF1MORSE:
                break;

  7. #727
    150+ Forum Groupie


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

    bump bump__

  8. #728
    150+ Forum Groupie


    388TH_A's Avatar
    Join Date
    Nov 2008
    Location
    Medford, Oregon (USA)
    Posts
    238
    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
    Just come to the realisation that there are no offsets for the OFF, STBY, ON, ALT or test, so it was a pointless exercise.

    I've gone back to basics, I've pulled two of the switches out and converted the holes to fit the rotary encoders, so now I have the same layout as Rob uses ie: 2 rotary encoders, 4 digits and a dummy 5 position switch.

    The code compiles so that's a good sign. I just need to wire it all up to test.

    When I'm done with the coding, I will be giving the uncompiled project to anyone who wants to build a cessna cockpit using FSBus dll. Hope no one minds (I'm sure no one does).

    David
    Quote Originally Posted by RobiD View Post
    Hi Stefan,

    Thanks for your comments.

    I think I will have to redesign my transponder. I built this a long time ago from someone elses idea.

    I will have to get the old cnc machine out again.

    Am I correct:

    Rob's code is based on 1 rotary encoder
    A 5 position rotary switch (for OFF, STBY, ON, ALT, TEST)
    It is a 5 7-segment display (not 4 like mine is)

    Regards
    David
    Quote Originally Posted by RobiD View Post
    Hi Stefan,

    Back again. Everything is going great.

    I have started on the xponder.

    My set us uses 4 on-off-on self centering switches for the four digits, one for each digit (push up for up one number and press down for down one number), (hope that makes sense).

    I have a 12 position rotary switch which I use for: Off, SBY, ON, ALT, TEST.

    What do I need to change in Rob's (it's probably your code) code to achieve this.

    Oh, another thing, I have a single LED as an on indicator.

    Appreciate your help once again.

    David

    Here's Rob's code

    Code:
    
    case FS_TRANSPONDERSETTING:
    Expdr = BCD2Int(val);
    FsbusWrite (C_DXPNDR, Expdr);
    break;
    case C_RXPNDRL:
    if (val > 0)
    {
    Expdr += 1000;
    if ((Expdr % 10000) > 7777)
    Expdr -= 8000;
    }
    else
    {
    Expdr += 100;
    if ((Expdr % 1000) > 777)
    Expdr -= 800;
    }
    FsbusWrite(C_DXPNDR, Expdr);
    x = Int2BCD(Expdr);
    FsWrite(FS_TRANSPONDERSETTING, x);
    break;
    case C_RXPNDRR:
    if (val > 0)
    {
    Expdr += 10;
    if ((Expdr % 100) > 77)
    Expdr -= 80;
    }
    else
    {
    Expdr += 1;
    if ((Expdr % 10) > 7)
    Expdr -= 8;
    }
    FsbusWrite(C_DXPNDR, Expdr);
    x = Int2BCD(Expdr);
    FsWrite(FS_TRANSPONDERSETTING, x);
    break;
    case C_SXPNDRIDENT://this would be off?
    break;
    case C_SXPNDRCTRL1://this would be sby?
    break;
    case C_SXPNDRCTRL2://this would be on?
    break;
    case C_SXPNDRCTRL3://this would be alt?
    break;
    case C_SXPNDRCTRL4://this would be test?
    break;
    case C_SXPNDRCTRL5:
    break;
    
    I did find this
    Code:
    65CB 1 BYTE XPDR_XpndrSelector_2; false: 1 true: 265CC 1 BYTE XPDR_AltSourceSel_2 false: 1 true: 2
    65CD 1 BYTE XPDR_ModeSel 0: STBY
    1: ALT RPTG OFF
    ...
    4: TA/RA
    65CE 1 BYTE XPDR_annunFAIL Boolean
    http://fsuipc.simflight.com/beta/Off...PMDG737NGX.pdf

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

    Been away from building for a long... long time. Great to see this thread still going and helping people out. Don't forget to share your work (if you wish to) so that it helps others.

    Cheers,
    David

  10. #730
    150+ Forum Groupie


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

    im still stuck

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