Results 401 to 410 of 737
Thread: Progamming help with FSBus dll
-
05-22-2010, 11:34 PM #401
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
-
05-23-2010, 01:48 PM #402
Re: Progamming help with FSBus dll
-
05-23-2010, 05:54 PM #403
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;
-
05-24-2010, 08:14 AM #404
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?
-
05-24-2010, 08:20 AM #405
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
There is no error. Rebuild the complet Project.
-
05-24-2010, 06:10 PM #406
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);
-
05-24-2010, 07:16 PM #407
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;
-
05-25-2010, 05:14 AM #408
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.
-
05-25-2010, 09:48 PM #409
Re: Progamming help with FSBus dll
Nice well take them soon i wana see your cockpit and everything
-
05-27-2010, 07:33 AM #410
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
-
Fsbus CDK
By flyandre in forum General Builder Questions All Aircraft TypesReplies: 4Last Post: 12-27-2014, 12:58 PM -
Need Help Getting My FSBUS NG I/O Going Again..
By JBRoberts in forum I/O Interfacing Hardware and SoftwareReplies: 14Last Post: 03-21-2010, 01:38 PM -
Fsbus ng io
By Davral in forum I/O Interfacing Hardware and SoftwareReplies: 0Last Post: 01-10-2009, 10:38 PM -
Fsbus 2.4.3
By Anderson/SBSP in forum I/O Interfacing Hardware and SoftwareReplies: 9Last Post: 11-30-2008, 04:25 PM -
Help FSBUS
By cesarfsim in forum I/O Interfacing Hardware and SoftwareReplies: 2Last Post: 10-26-2008, 02:23 PM
Meet Women Ready for Fun Tonight in Your Town
Experience the Best of Casual...