Page 42 of 74 FirstFirst ... 3238394041424344454652 ... LastLast
Results 411 to 420 of 737
  1. #411
    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 388TH_A View Post
    when i flip my master autopilot switch on or off i get this error and same thing with when ever i flip my flight dir switch. Dont get me wrong it works fine but also when ever i flip the switch and get that error my PC speaker makes a beep and i dont really wana hear it beep every time.

    Do you oguys have any ideas?

  2. #412
    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 will know, but it seems that it's object 72 in group 2 (just an uneducated guess). I'm not clear on what is meant or referred to with the statement 'Unserviced'

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

    More Photos of the inside of my cockpit with gauges MCP and backlighting.

    First one is sitting in the pilots seat looking down. MCP front middle, ADF left, xponder right. You can see that I have modified the cockpit to fit the size for 1 person motion sim. Bottom left is the key ignition switch, above that are the avionics switches, and to the right are the aircore gauges, fuel, fuel pressure etc. Above that are all the standard Cessna gauges except the Altitude indicator which you can see that I'm still building from the pictures in the earlier post below and the RMI/ADF gauge. Flaps lever is on the right of the radio stacks (which I have still to build the display boards for COM1 & 2 and NAV2. I have the right hand side removed in this photo for extra light but when it's on, it's quite immersive. Oh, Throttle, mixture and prop controls are above and to the right of the radio stacks.



    Next is a close up of the MCP (excuse the unfinished wood look). The Korry switch legends light up when I turn on the Avionics switch and the amber part obviously turns on when I press the switch or do something that disengages the A/P.



    This one is a more distant look at the MCP and the gauges, as you can see, I'm on the glideslope but need to stop taking pictures so I can press the APP button.





    Last one: I haven't begun to work on this yet, the only bits working is the Lights switches and the dimming control for the cockpit backlighting. You can see that my cnc skills had improved when I got to cutting and engraving these panels. It also gives you an idea of the quality of the backlighting. (lots of Korries to build to finish this)




    Will post some more when I can.

    David

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

    That error i was getting Stefan was able to help me out and was able to fix it. the problem was that i didnt have a case for that obj

    Trevor

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

    The one thing about C++ is that when you get error messages, it always something logical you have forgotten. The difficult part is remembering what you have forgotten.

    David

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

    Thats for sure. But this one didnt even know i had to create a case for every objbut now i know.

    Trevor

  7. #417
    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 i have my Autopilot almost done would either of you be willing to post just your code for the Spd and Mach button? im trying to gut out all the extra code that i dont need for it. also i noticed where there is code for engine 1 and 2 for spd and mach, do i need thoughs? Also what if it was a 4 Engine aircraft would it only work the 1st and 2nd Eng. Just wanting to talk about it and throw ideas back and forth about the SPD and MACH code and also wanted to get mine working. And also i just dont understand the whole spdmach buttons right now. Thanks

    Trevor

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

    Do you mean the Speed hold button and the Mach/IAS buttons?

    I've gone through the code and picked out the bits and pieces. You will probably know that I've just copied and pasted the bits here so it won't work without being coded properly (I know you know that but it's also for the sake of others that may copy it too).

    David
    PS sorry for the delay in getting it posted.
    Code:
    static   int    AirspeedHold     = 0;           // 0 off, -1 on
    
    MkFsbusObject(BTP_ROTARY, C_RIAS,		"",cbModecontrolpanel, 28, 34);
    
    MkFsbusObject(BTP_D_IN,   C_SSPDHLD,          "",cbModecontrolpanel, 28, 56);
    
    MkFsbusObject(BTP_D_IN,   C_SVSPEEDHLD,       "",cbModecontrolpanel, 28, 5);
    MkFsbusObject(BTP_D_IN,   C_SCHANGEOVER,      "",cbModecontrolpanel, 28, 58);
    MkFsbusObject(BTP_D_OUT,  C_LAIRSPEEDHOLD,    "",cbModecontrolpanel, 28, 9);
    
    MkFsObject(FS_AP_AIRSPEEDHOLD,    "",cbModecontrolpanel, 0x07DC, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_AIRSPEED,        "",cbModecontrolpanel, 0x07E2, 2,  TP_UI16,  FS_NORMAL);
        MkFsObject(FS_AP_MACHHOLD,        "",cbModecontrolpanel, 0x07E4, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_MACH,            "",cbModecontrolpanel, 0x07E8, 4,  TP_UI32,  FS_NORMAL);
    
    
    case C_RIAS:
                //EventHandler(S_RHEADING, 0, 0); // sound rotary
                if (MachSpeed == 0)
                {
                    Airspeed -= val;
                    if (Airspeed < 100) // minimum 100 knts
                        Airspeed = 100;
                    if (Airspeed > 340) // maximum 340 knts
                        Airspeed = 340;
                    FsWrite(FS_AP_AIRSPEED, Airspeed);  // to FS
                    FsbusWrite(C_DIAS, Airspeed);
                }
                else 
                {
                    Mach -= val;
                    if (Mach > 70)
                        Mach = 70;
                    if (Mach < 10)
                        Mach = 10;
                    FsWrite(FS_AP_MACH, Mach * 65536 / 100);
                    FsbusWrite(C_DIAS, Mach);
                }
                break;
    
    case C_SAUTOTHROTTLEARM:
                CockpitATArmed = (val == 0) ? 1 : 0;
                if (bSynchronised) // pass only when in sync
                    FsWrite(FS_AUTOTHROTTLEARM, (val == 0) ? 1 : 0);
                FsbusWrite(C_LATARMED, CockpitATArmed);
                printf("C_SAUTOTHROTTLEARM event, CockpitATarmed  %d\n", CockpitATArmed);
                if (CockpitATArmed == 0)
                {
                    AirspeedHold = 0;
                    MachHold = 0;
                }
                break;
            case C_SN1:
                if ((val == 0) & (CockpitATArmed == 1)) // button push only
                {                                                                                                                       //  AT on
                    //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                    EngN1 = (EngN1 == 0) ? 1 : 0; // toggle
                    if (MachSpeed == 0)
                        FsWrite(FS_AP_AIRSPEEDHOLD, EngN1); // to FS
                    else
                        FsWrite(FS_AP_MACHHOLD, EngN1);
                    if (EngN1 == 1)
                        AirspeedHold = 0;
                    FsbusWrite(C_LN1, EngN1);
                    FsbusWrite(C_LAIRSPEEDHOLD, AirspeedHold);
                    FsWrite(FS_ENGINE1N1, EngN1);
                    FsWrite(FS_ENGINE1N2, EngN1);
                }
                break;
            case C_SSPDHLD:
                if ( (val == 0) && (CockpitATArmed == 1) ) // button push only
                {
                    //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                    AirspeedHold = (AirspeedHold == 0) ? 1 : 0; // toggle
                    FsbusWrite(C_LAIRSPEEDHOLD, AirspeedHold);
                    if (AirspeedHold == 1)
                    {
                        EngN1 = 0;
                        FsbusWrite(C_LN1, EngN1);
                        if (MachSpeed == 0)
                            FsWrite(FS_AP_AIRSPEEDHOLD, 1);
                        else
                            FsWrite(FS_AP_MACHHOLD, 1);
                    }
                    else
                    {
                        FsWrite(FS_AP_AIRSPEEDHOLD, 0);
                        FsWrite(FS_AP_MACHHOLD, 0);
                    }
                    //FsWrite(FS_ENGINE1N1, EngN1);
                    //FsWrite(FS_ENGINE1N2, EngN1);
                 }
                break;
    
    case C_SCHANGEOVER:
                //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                if (val == 0) // button push only
                {
                    MachSpeed = (MachSpeed == 0) ? 1 : 0; // toggle
                    if (MachSpeed == 1) // Mach indication
                    {
                        DisplayOptions(C_DIAS, 3, 0, TRUE, 3);
                        FsbusWrite(C_DIAS, Mach);
                        FsWrite(FS_AP_MACHHOLD, 1);
                    }
                    else // IAS indication
                    {
                        DisplayOptions(C_DIAS, 4, 0, FALSE, 0); // Fsbus bug (p5=0)
                        FsbusWrite(C_DIAS, Airspeed);
                        FsWrite (FS_AP_AIRSPEEDHOLD, 1);
                    }
                }
                break;
    
    case FS_AP_MACHHOLD:
                if (AirspeedHold == 1)
                {
                    FsbusWrite(C_LAIRSPEEDHOLD, 1);
                    FsbusWrite(C_LN1, 0);
                }
                else if (EngN1 == 1)
                {
                    FsbusWrite(C_LAIRSPEEDHOLD, 0);
                    FsbusWrite(C_LN1, 1);
                }
                else
                {
                    FsbusWrite(C_LAIRSPEEDHOLD, 0);
                    FsbusWrite(C_LN1, 0);
                }
                break;
            case FS_AP_AIRSPEED:
                Airspeed = val;
                if (MachSpeed == 0) // display in IAS mode
                    FsbusWrite(C_DIAS, Airspeed); // new speed
                break;
            case FS_AP_MACH:
                Mach = (val * 100 + 50) / 65536 ;  // round to 0.01
     //           printf("FS_AP_MACH event, Mach=%d.%02d\n", Mach / 100, Mach % 100);
                if (MachSpeed == 1)  // display in Mach mode
                    FsbusWrite(C_DIAS, Mach);  // new Mach
                break;

  9. Thanks 388TH_A thanked for this post
  10. #419
    New Member
    Join Date
    Jun 2010
    Location
    Russia
    Posts
    4
    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!
    I also made modules for fsbus dll 2009, but the stepper motor module works only from the "Admin". What is the problem? How to solve it?

    Sorry for my English =)

  11. #420
    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

    Rusdex,

    Can you show us the code your using to control the stepper board (C++ code).

    Thanks
    David

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