Page 9 of 74 FirstFirst ... 56789101112131959 ... LastLast
Results 81 to 90 of 737
  1. #81
    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,

    Where do I find the RID numbers for J5 on the DIO. I can find the 0-63 for keys and 72-79 for J3 in the DIO manual but I can't find J4 and J5.

    David

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

    It is to easy, 0-15.

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

    Quote Originally Posted by sgaert View Post
    It is to easy, 0-15.

    0-63 on the DIO board is the key inputs (switches and such). I have 0-5 already assigned to switches.

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

    Oh, just got it. 0-63 for the keys are "in" 0-15 are "out"

    Thanks

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

    Tested it out with FSX.
    GS indicator comes on when your on or approaching the GS.

    The "to" light is on. (not sure how to get the "from" indicator to light up to test it).

    Very happy about how things are going so far.

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

    not sure how to get the "from" indicator to light up to test it
    Use a VOR fly to or away from them.

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

    Great, it works perfectly.

    For my next great acheivement (of course with your help), I want to do the Master Battery, Alternator, Avionics switches and the fuel pump switch.

    I have tried to find a simple example in Robs project and also the cockpit project example, and I can't find a good single switch example.

    Here's were I'm at:

    switches.h


    #ifndef
    __SWITCHES_H__
    #define __SWITCHES_H__
    void cbSwitchesBuildObjects();
    void cbSwitches (int oid, int val, double dval);
    #endif


    switches.cpp


    #include
    "stdafx.h"
    void cbSwitchesBuildObjects()
    {
    MkFsbusObject (BTP_D_IN,C_SWITCH_ALTERNATOR,
    "MasterAltSwitch",cbSwitches,27,57);
    MkFsbusObject (BTP_D_IN,C_SWITCH_MASTERBATT,
    "MasterBattSwitch",cbSwitches,27,56);
    MkFsbusObject (BTP_D_IN,C_SWITCH_MASTERAVIONICS,
    "MasterAvionicsSwitch",cbSwitches,27,55);
    MkFsbusObject (BTP_D_IN,C_SWITCH_FUELPUMP,
    "FuelboostPumpSwitch",cbSwitches,27,5;

    MkFsObject(FS_ALTERNATOR,
    "MasterAlternatorSwitch",cbSwitches, 0x3101,1,TP_I8,FS_NORMAL);
    MkFsObject(FS_MASTERBATTERYSWITCH,
    "MasterBattSwitch",cbSwitches, 0x281C, 4, TP_I32, FS_NORMAL);
    MkFsObject(FS_MASTERAVIONICSSWITCH,
    "MasterAvionicsSwitch",cbSwitches, 0x2E80, 4, TP_I32, FS_NORMAL);
    MkFsObject(FS_FUELPUMP,
    "FuelBoostPumpSwitch",cbSwitches, 0x3104, 1, TP_I8, FS_NORMAL);
    }



    stdafx.h


    #include
    "switches.h"
    #define OID_SWITCHES_GROUP (17 << OID_CONTROL_BITS)
    #define C_SWITCH_ALTERNATOR OID_SWITCHES_GROUP +1
    #define FS_ALTERNATOR OID_SWITCHES_GROUP +2
    #define C_SWITCH_MASTERBATT OID_SWITCHES_GROUP +3
    #define FS_MASTERBATTERYSWITCH OID_SWITCHES_GROUP +4
    #define C_SWITCH_MASTERAVIONICS OID_SWITCHES_GROUP +5
    #define FS_MASTERAVIONICSSWITCH OID_SWITCHES_GROUP +6
    #define C_SWITCH_FUELPUMP OID_SWITCHES_GROUP +7
    #define FS_FUELPUMP OID_SWITCHES_GROUP +8



    What arguments (if that's the correct terminology) do I need to put in the switches.cpp file to complete it?

    As it is, when I compile, I get these two errors:


    switches.obj : error LNK2001: unresolved external symbol "void __cdecl cbSwitches(int,int,double)" (?cbSwitches@@YAXHHN@Z)
    1>C:\Documents and Settings\David\My Documents\Visual Studio 2008\Projects\Davids Flight sim\Debug\Davids Flight sim.exe : fatal error LNK1120: 1 unresolved externals

    Thanks again,
    David

  8. #88
    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,
    as first i found.
    Master Battery switch = 0x3102
    Avionics switch = 0x3103

    switches.cpp


    #include"stdafx.h"
    void cbSwitchesBuildObjects()
    {
    MkFsbusObject (BTP_D_IN,C_SWITCH_ALTERNATOR,"MasterAltSwitch",cbSwitches,27,57);
    MkFsbusObject (BTP_D_IN,C_SWITCH_MASTERBATT,"MasterBattSwitch",cbSwitches,27,56);
    MkFsbusObject (BTP_D_IN,C_SWITCH_MASTERAVIONICS,"MasterAvionicsSwitch",cbSwitches,27,55);
    MkFsbusObject (BTP_D_IN,C_SWITCH_FUELPUMP,"FuelboostPumpSwitch",cbSwitches,27,5;

    MkFsObject(FS_ALTERNATOR,"MasterAlternatorSwitch",cbSwitches, 0x3101,1,TP_I8,FS_NORMAL);
    MkFsObject(FS_MASTERBATTERYSWITCH,"MasterBattSwitch",cbSwitches, 0x281C, 4, TP_I32, FS_NORMAL);
    MkFsObject(FS_MASTERAVIONICSSWITCH,"MasterAvionicsSwitch",cbSwitches, 0x2E80, 4, TP_I32, FS_NORMAL);
    MkFsObject(FS_FUELPUMP,"FuelBoostPumpSwitch",cbSwitches, 0x3104, 1, TP_I8, FS_NORMAL);
    }

    void cbSwitches (int oid, int val, double dval);
    {
    switch (oid)
    {
    case C_SWITCH_ALTERNATOR:
    FsWrite (FS_ALTERNATOR, !val); // i donīt know whether that work
    break;
    }
    }

    If that not work you have to do the long form, like at the LED part from yesterday.

    Regards,
    Stefan

  9. #89
    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,

    I'm getting this error message on compiling:

    switches.cpp(17) : error C2447: '{' : missing function header (old-style formal list?)

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

    my fault.

    void cbSwitches (int oid, int val, double dval)

Page 9 of 74 FirstFirst ... 56789101112131959 ... LastLast

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