Results 411 to 420 of 737
Thread: Progamming help with FSBus dll
-
05-27-2010, 11:07 PM #411
-
05-27-2010, 11:54 PM #412
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'
-
05-28-2010, 05:56 AM #413
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
-
05-30-2010, 06:28 PM #414
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
-
05-30-2010, 07:05 PM #415
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
-
05-30-2010, 07:20 PM #416
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
-
05-31-2010, 05:10 AM #417
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
-
06-03-2010, 05:26 AM #418
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;
-
Post Thanks / Like - 1 Thanks, 0 Likes, 0 Dislikes388TH_A thanked for this post
-
06-04-2010, 03:13 PM #419
- Join Date
- Jun 2010
- Location
- Russia
- Posts
- 4
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 =)
-
06-04-2010, 06:37 PM #420
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
-
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
Candid connections: Platform for casual relationships Live Women Prime Сasual Dating
Super Сasual Dating - Genuine...