Page 34 of 74 FirstFirst ... 2430313233343536373844 ... LastLast
Results 331 to 340 of 737
  1. #331
    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

    Yeah that would make since just to make sure the wires are going to the right pin. And how do you know what kind of stepper motor to get?

    Trevor

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

    Do you Stefan or David have skype?

  3. #333
    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 get a PM.

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

    My wife does, but I can join, no problems.

    I'll PM when I'm done.

    David

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

    I think i found both of your User names for sype and i already added both of you

    Trevor

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

    Hi Trevor,

    Just sent you and Stefan a PM.

    David

  7. #337
    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

    My C++ i can only use with FS2004 right now. for what ever reason im not able to use it with FSX. Would you guys be willing to post your code of your main CPP so i can compare it with mine. And also can i have one C++ exe and use it for both FS2004 and FSX? I mostly use FS2004 but also would like to use my stuff with FSX for when i do Multiplayer Pilot/Copilot. Here is the code im using right now, what do i need to change so i can use it with both?

    Code:
    #include "stdafx.h"
    #include "rvdb737ng.h"                            
    
    
    
    /* ------------ global variables ------------- */
    
    extern  BOOL  bSynchronised = false;            // cockpit not in sync with FS
    
    
    /* ========================== */
    /*     M A I N L I N E        */
    /* ========================== */
    
    int _tmain(int argc, _TCHAR* argv[])
    {
        int   KeyboardInput = -1;                   // Input from keyboard
        short PauseState;                           // FS in Pause state (if 1)
    
        int  V = GetFsbusDLLVersion();
        printf("Detected Fsbus version %d.%d.%d\n",
                   V/100, (V%100)/10, V%10);
        if (V < 200)
        {
            printf ("Program requires Fsbus DLL version 2.0.0 or higher\n");
            return 1;
        }
    
    //  signal(SIGINT, SIG_IGN);                    // Ignore Ctrl-Break
    //  signal(SIGBREAK, SIG_IGN);                  //    and Ctrl-C
    
        OpenLog();                                  // start log function
    
        CheckIn();                                  // Connect to FSbus.dll
    
        FsbusOpen("Com1");                          // start communications with Fsbus
    
        GlareshieldBuildObjects();                  // )
        MainpanelBuildObjects();                    // )
    	AftoverheadBuildObjects();                  // )
        FwdoverheadBuildObjects();                  // ) Create objects by group
        PedestalBuildObjects();                     // )
        SoundBuildObjects();                        // )
        ThrottlequadrantBuildObjects();             // )
    
        FsConnect();                                // start communications with FS
    
        WriteLog(0,0,0);
        FsbusWriteFmt2(0,128,0);                    // Fsbus reset
        WriteLog(0,0,0);
        FsbusMux(3000);                             // time to process Fsbus events
        WriteLog(0,0,0);
        GlareshieldSync();                                  // )
        MainpanelSync();                            // )
    	AftoverheadSync();                             // )
       	FwdoverheadSync();                             // ) Sync cockpit with FS
        PedestalSync();                             // )
        ThrottlequadrantSync();                     // )
    
        bSynchronised = true;                       // we are in sync now
    
        printf("Hit Escape key to terminate Fsbus program....\n");
    
        FsReadDirect(0x0264, 2, &PauseState);       // get FS pause-state
        if (PauseState == 1)                        // paused
        {
            PauseState = 0;
            FsWriteDirect(0x0262, 2, &PauseState);  // un-pause
        }
    
        /* - - - - wait for Escape (termination) by user - - - - */
    
        while (KeyboardInput != VK_ESCAPE)          // not 'Esc' key
            KeyboardInput = ReadKeyboard(1000);     // check keyboard
    
        /* - - - - - - - - - - - - - - - - - - - - - - - - - - - */
    
        CloseLog();                                 // stop logging
        CheckOut();                                 // disconnect FSbus.dll
    
    //  signal(SIGBREAK, SIG_DFL);                  // Restore Ctrl-C default
    //  signal(SIGINT, SIG_DFL);                    //     and Ctrl-Break default
    
        return 0;                                   // terminate program
    }
    
    
    // -------------------------------------------------------------- */
    //  Function called by fsbus.dll with every event.                */
    //  Can also be called by other modules of this project           */
    //  for example with synchronisation of cockpit with FS.          */
    // -------------------------------------------------------------- */
    extern void EventHandler(int oid, int val, double dval)
    {
        WriteLog(oid, val, dval);                           // log event
    
        switch (oid / OBJECTS_PER_GROUP)                    // select group
        {
            case GROUP_MAINPANEL:
                MainpanelEventHandler(oid, val, dval);
                break;
            case GROUP_GLARESHIELD:
                GlareshieldEventHandler(oid, val, dval);
                break;
    		case GROUP_AFTOVERHEAD:
                AftoverheadEventHandler(oid, val, dval);
    			break;
            case GROUP_FWDOVERHEAD:
                FwdoverheadEventHandler(oid, val, dval);
                break;
            case GROUP_PEDESTAL:
                PedestalEventHandler(oid, val, dval);
                break;
            case GROUP_SOUND:
                SoundEventHandler(oid, val, dval);
                break;
            case GROUP_THROTTLEQUADRANT:
                ThrottlequadrantEventHandler(oid, val, dval);
                break;
            default:
                printf("%cError: Object %d (%d:%d) in unknown group.\n",
                        7, oid, oid / OBJECTS_PER_GROUP, oid % OBJECTS_PER_GROUP);
        }
    }

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

    Hey Trevor,

    Good to have a chat the other night. I'm more than happy to post any of my code, but as requested, here is my main .cpp file.

    Speak soon,
    David

    Code:
    // Davids Flight sim.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    #include 
    #include 
    
    extern  BOOL  bSynchronised = false;
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	int v =  GetFsbusDLLVersion ();
    	if (v < 100)
    	{
    		printf ("Program requires Fsbus DLL version 1.0.0 or higher\r\n");
    		return 1;
    	}
    
        CheckIn();
    	FsConnect();
        FsbusOpen("COM1");
    		
    	
    	cbLLSwitchboardBuildObjects();
    	cbMagnetoBuildObjects();
    	//cbEngineBuildObjects();
    	cbEnginerpmBuildObjects();
    	cbGaugesBuildObjects();
    	cbSwitchesBuildObjects();
    	cbVoltmetersBuildObjects();
    	cbNavBuildObjects();
    	cbIndicatorlightsBuildObjects();
    	//cbMcpBuildObjects();
    	cbModecontrolpanelBuildObjects();
    
    
    	FsbusWriteFmt2(9,128,0);                    // Fsbus reset CID 9
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(10,128,0);                    // Fsbus reset CID 10
    	FsbusMux(350);
    	FsbusWriteFmt2(11,128,0);                    // Fsbus reset CID 11
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(12,128,0);                    // Fsbus reset CID 12
    	FsbusMux(350);
    	FsbusWriteFmt2(13,128,0);                    // Fsbus reset CID 13
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(14,128,0);                    // Fsbus reset CID 14
    	FsbusMux(350);
    	FsbusWriteFmt2(15,128,0);                    // Fsbus reset CID 15
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(16,128,0);                    // Fsbus reset CID 16
    	FsbusMux(350);
    	FsbusWriteFmt2(17,128,0);                    // Fsbus reset CID 17
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(18,128,0);                    // Fsbus reset CID 18
    	FsbusMux(350);
    	FsbusWriteFmt2(19,128,0);                    // Fsbus reset CID 19
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(20,128,0);                    // Fsbus reset CID 20
    	FsbusMux(350);
    	FsbusWriteFmt2(21,128,0);                    // Fsbus reset CID 21
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(22,128,0);                    // Fsbus reset CID 22
    	FsbusMux(350);
    	FsbusWriteFmt2(23,128,0);                    // Fsbus reset CID 23
    	FsbusMux(350);                              // time to process Fsbus events
    	FsbusWriteFmt2(24,128,0);                    // Fsbus reset CID 24
    	FsbusMux(350);
    
    	
    	bSynchronised = true;
    		
    
    	printf ("press any key to exit ...\r\n");
    	
    	while (!_kbhit())
    		FsbusMux(500);
    	
    	CheckOut();
    	return 0;
    }

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

    FSbus only know FSUIPC.
    There is no differance between FS9 or FSX.

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

    Hi Stefan,

    This is what I thought too, so thanks for the confirmation.

    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