Page 41 of 74 FirstFirst ... 3137383940414243444551 ... LastLast
Results 401 to 410 of 737
  1. #401
    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

    Autopilot on/off is momentary switch. It only requires 1 rid on the IO board as there are only 2 wires coming from the switch.
    FD is a toggle on/off so only 2 wires and 1 rid
    NAV is also a momentary switch 1 rid.
    Auto throttle arm switch is toggle still 1 rid

    David

  2. #402
    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
    Autopilot on/off is momentary switch. It only requires 1 rid on the IO board as there are only 2 wires coming from the switch.
    FD is a toggle on/off so only 2 wires and 1 rid
    NAV is also a momentary switch 1 rid.
    Auto throttle arm switch is toggle still 1 rid

    David
    And that NAV, are you talking about the NAV/GPS switch? flip one side and its NAV and ther side for GPS. So there all 1 rid? next question is do i need to use a on/on switch for any of them and wire the 2 common polls together? if that makes since.....

    Trevor

  3. #403
    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 am getting this error when i try to build it

    glareshield.cpp(6) : error C2144: syntax error : 'int' should be preceded by '}'
    glareshield.cpp(6) : error C2144: syntax error : 'int' should be preceded by ';'

    Here is the Code but i dont see any thing wrong! I compare it to other cpp files and there the same so not sure what this is asking of me to fix when there isnt any thing.


    Code:
    #include "stdafx.h"
    #include "glareshield.h"
    
    // static variables: accessible by all functions in this module
    
    static   int    ActAlt           = 0;           // actual altitude
    static   int    Airspeed         = 0;           // knots
    static   int    AirspeedHold     = 0;           // 0 off, -1 on
    static   int    AltitudeLock     = 0;           // 0 off, -1 on
    static   int    Altitude         = 0;           // feet
    static   int    AltitudeSave     = 0;           // feet
    static   int    ApproachHold     = 0;           // 0 off, -1 on
    static   int    APHeading        = 0;           // 0..359 degrees)
    static   int    AutoThrottleArm  = 0;           // 0 off, -1 on
    static   int    MachHold         = 0;           //
    static   int    MachSpeed        = 0;           // 0 spd, 1 mach
    static   int    MasterAP         = 0;           // 0 off, 1 on
    static   int    ValFlightDir     = 0;           // 0:  ??
                                                    // 1:  ??
                                                    // 2:  ??
                                                    // 3:  ??
                                                    // 4:  ??
    static   int    Cmda             = 0;           // 0 off, -1 on
    static   int    Cmdb             = 0;           // 0 off, -1 on
    static   int    Cwsa             = 0;           // 0 off, -1 on
    static   int    Cwsb             = 0;           // 0 off, -1 on
    static   int    CockpitATArmed   = 0;           // 0 off, -1 on
    static   int    Course           = 0;           // 0..359 degrees)
    static   int    Disengage        = 0;           // 0 off, -1 on
    static   short  Engine1N1        = 0;           // units: percent
    static   short  Engine1N2        = 0;           // units: percent
    static   int    EngN1            = 0;           // 0 off, -1 on
    static   int    FSATArmed        = 0;           // 0 off, -1 on
    static   int    HeadingLock      = 0;           // 0 off, -1 on
    static   int    LvlChg           = 0;           // 0 off, -1 on
    static   int    Mach             = 0;           // 0.01 units
    static   int    Vertspeed        = 0;           // feet/min
    static   int    VertspeedHold    = 0;           // 0 off, -1
    static	 int	apalt			 = 0;
    Trevor

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

    This should be line 6

    static int ActAlt = 0; // actual altitude

    But I don't see anything wrong with it. The syntax is the same as my file.

    Perhaps Stefan can spot it.

    Oh, did you sort out the problem on the DIO board?

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

    There is no error. Rebuild the complet Project.

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

    Well i took out your code David and put back the original code and i was able to build it. So now im going to compare both codes and try to make it so that it works for me and what im doing. I got this and that to work on it just need to narrow it down and make it all work. And as far as the IO PCB i wasnt able to find the problem so i just left it. Im not using enough switches for it to matter so instead of 64 ill just be able to hook up 32 but thats ok i have less then that in the Autopilot box any ways. Well here are some pics of what i have done on the Autopilot. I put this together last night. http://ttd.g11.us/fsbus/autopilot.html Also i am using F/D, A/T, AP, Nav, App, HDG, IAS, Mach, Alt, BC, Y/D, Nav2. So there for i dont need All of these right?

    Code:
     MkFsObject(FS_ALTITUDE,           "OID", EventHandler, 0x0574, 4,  TP_I32,   FS_NORMAL);
        MkFsObject(FS_AP_MASTER,          "OID", EventHandler, 0x07BC, 4,  TP_UI32,  FS_NORMAL);
      MkFsObject(FS_AP_WINGLEVELER,     "OID", EventHandler, 0x07C0, 4,  TP_UI32,  FS_NONE);
        MkFsObject(FS_AP_NAV1LOCK,        "OID", EventHandler, 0x07C4, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_HEADINGLOCK,     "OID", EventHandler, 0x07C8, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_HEADING,         "OID", EventHandler, 0x07CC, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_ALTITUDELOCK,    "OID", EventHandler, 0x07D0, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_ALTITUDE,        "OID", EventHandler, 0x07D4, 4,  TP_UI32,  FS_NORMAL);
      MkFsObject(FS_AP_ATTITUDEHOLD,    "OID", EventHandler, 0x07D8, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_AIRSPEEDHOLD,    "OID", EventHandler, 0x07DC, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_AIRSPEED,        "OID", EventHandler, 0x07E2, 2,  TP_UI16,  FS_NORMAL);
        MkFsObject(FS_AP_MACHHOLD,        "OID", EventHandler, 0x07E4, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_MACH,            "OID", EventHandler, 0x07E8, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_VSHOLD,          "OID", EventHandler, 0x07EC, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_VS,              "OID", EventHandler, 0x07F2, 2,  TP_I16,   FS_NORMAL);
      MkFsObject(FS_AP_RPMHOLD,         "OID", EventHandler, 0x07F4, 4,  TP_UI32,  FS_NORMAL);
      MkFsObject(FS_AP_RPM,             "OID", EventHandler, 0x07FA, 2,  TP_UI16,  FS_NORMAL);
        MkFsObject(FS_AP_GLIDESLOPEHOLD,  "OID", EventHandler, 0x07FC, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AP_APPROACHHOLD,    "OID", EventHandler, 0x0800, 4,  TP_UI32,  FS_NORMAL);
      MkFsObject(FS_AP_BCHOLD,          "OID", EventHandler, 0x0804, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_AUTOTHROTTLEARM,    "OID", EventHandler, 0x0810, 4,  TP_UI32,  FS_NORMAL);
        MkFsObject(FS_NAV1OBS,            "OID", EventHandler, 0x0C4E, 2,  TP_I16,   FS_NONE);
        MkFsObject(FS_FLIGHTDIRECTOR,     "OID", EventHandler, 0x2EE0, 4,  TP_I32,   FS_NORMAL);
        MkFsObject(FS_ENGINE1N2,          "OID", EventHandler, 0x0896, 2,  TP_I16,   FS_NORMAL);
        MkFsObject(FS_ENGINE1N1,          "OID", EventHandler, 0x0898, 2,  TP_I16,   FS_NORMAL);

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

    Like this im thinking about taking this out just seems like i dont need it all just for one switch.

    Code:
            case C_SCMDA:
                if ((val==0) && (Disengage == 0)) // button push only
                {
                    //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
    
                    Cmda = (Cmda == 0) ? 1 : 0; // toggle
                    if (Cmda == 0)
                        FsbusWrite(C_LCMDA, 0);
                    else
                    {
                        FsbusWrite(C_LCMDA, 1);
                        FsbusWrite(C_LCMDB, 0);
                        FsbusWrite(C_LCWSA, 0);
                        FsbusWrite(C_LCWSB, 0);
                        FsWrite(FS_AP_MASTER, 1);
                    }
                }
                break;
            case C_SCMDB:
                if ((val==0) && (Disengage == 0)) // button push only
                {
                    //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                    Cmdb = (Cmdb == 0) ? 1 : 0; // toggle
                    if (Cmdb == 0)
                        FsbusWrite(C_LCMDB, 0);
                    else
                    {
                        FsbusWrite(C_LCMDB, 1);
                        FsbusWrite(C_LCWSA, 0);
                        FsbusWrite(C_LCWSB, 0);
                        FsWrite(FS_AP_MASTER, 1);
                    }
                }
                break;
           case C_SCWSA:
               if ((val==0) && (Disengage == 0)) // button push only
               {
                   //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                   Cwsa = (Cwsa == 0) ? 1 : 0; // toggle
                   if (Cwsa == 0)
                       FsbusWrite(C_LCWSA, 0);
                   else
                   {
                       FsbusWrite(C_LCMDA, 0);
                       FsbusWrite(C_LCMDB, 0);
                       FsbusWrite(C_LCWSA, 1);
                       FsbusWrite(C_LCWSB, 0);
                       FsWrite(FS_AP_MASTER, 1);
                   }
                }
                break;
            case C_SCWSB:
                if ((val==0) && (Disengage == 0)) // button push only
                {
                    //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                    Cwsb = (Cwsb == 0) ? 1 : 0; // toggle
                    if (Cwsb == 0)
                        FsbusWrite(C_LCWSB, 0);
                    else
                    {
                        FsbusWrite(C_LCMDA, 0);
                        FsbusWrite(C_LCMDB, 0);
                        FsbusWrite(C_LCWSA, 0);
                        FsbusWrite(C_LCWSB, 1);
                        FsWrite(FS_AP_MASTER, 1);
                    }
                }
                break;
            case C_SAPDISENGAGE:
                if (val==0) // button push only
                {
                    //EventHandler(S_SADFSWAP, 0, 0); // sound small switch
                    Disengage = (Disengage == 0) ? 1 : 0; // toggle
                    if (Disengage == 0)
                    {
                        FsbusWrite(C_LAPDISENGAGEL, 0);
                        FsbusWrite(C_LAPDISENGAGER, 0);
                    }
                    else
                    {
                        FsbusWrite(C_LAPDISENGAGEL, 1);
                        FsbusWrite(C_LAPDISENGAGER, 1);
                        FsbusWrite(C_LCMDA, 0);
                        FsbusWrite(C_LCMDB, 0);
                        FsbusWrite(C_LCWSA, 0);
                        FsbusWrite(C_LCWSB, 0);
                        FsWrite(FS_AP_MASTER, 0);
                    }
                }
                break;
    Also 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.

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

    Good work on the MCP.

    It's a lot of work but worth it when it does what it should.

    Let me know what the problem with the code was when you find it.

    David

    Oh, found the charger for the camera. I've cut out the decks for the altimeter (bezel, motor deck, gear deck etc), and I'm about to cut and engrave the 10000 needle so I'll try to take a couple of pics of that and post them.

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

    Nice well take them soon i wana see your cockpit and everything

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

    Ok, here's some pics.

    First one is of the cnc close up cutting the engraving the 10000 needle.




    Second is of the whole cnc set up. Of the two computer cases, top is the computer and the bottom houses the driver boards and break out board for the cnc which is parallel driven.



    Third is the cut out 10000 needle.



    Fourth is the 10000 needle inside the front of the gauge. I have cut all the pieces but have not painted or fitted the lighting. Also, just a black and white printout of the face of the gauge, but it gives you an idea of how the 10000 needle looks.




    I'll try to get some photos of the inside of the sim ie: mcp, glideslope indicator etc. oh, not to mention the aircore fuel level, fuel pressure, oil pressure, amps etc gauges.

    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