Results 81 to 90 of 737
Thread: Progamming help with FSBus dll
-
06-15-2009, 06:21 AM #81
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
-
06-15-2009, 06:25 AM #82
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
It is to easy, 0-15.
-
06-15-2009, 06:42 AM #83
-
06-15-2009, 06:48 AM #84
Re: Progamming help with FSBus dll
Oh, just got it. 0-63 for the keys are "in" 0-15 are "out"
Thanks
-
06-15-2009, 07:44 AM #85
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.
-
06-15-2009, 07:49 AM #86
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
not sure how to get the "from" indicator to light up to test it
-
06-15-2009, 11:18 PM #87
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
-
06-16-2009, 01:51 AM #88
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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磘 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
-
06-16-2009, 02:13 AM #89
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?)
-
06-16-2009, 02:21 AM #90
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
my fault.
void cbSwitches (int oid, int val, double dval)
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...