It's always something simple. Compiled fine.
I'll test that it works in FSX then add the other switches.
Thanks
David
Printable View
It's always something simple. Compiled fine.
I'll test that it works in FSX then add the other switches.
Thanks
David
Stefan,
In the DOS box, I am getting error message:
FSBUS DLL:
ObjectID-551(17,7) still in use
press any key to exit....
Any ideas what that means?
I have only just started FSX and only just powered up my boards and only just run the .exe (through compiling)
That mean you have twice the same object ID.
The message also say what object.
Group: 17
Object: 7
Is this where I should be looking?
The message is referring to the C_SWITCH_FUELPUMP OID_SWITCHES_GROUP +7
#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_BATTERY OID_SWITCHES_GROUP +4
#define C_SWITCH_MASTERAVIONICS OID_SWITCHES_GROUP +5
#define FS_AVIONICS OID_SWITCHES_GROUP +6
#define C_SWITCH_FUELPUMP OID_SWITCHES_GROUP +7
#define FS_FUELPUMP OID_SWITCHES_GROUP +8
Hi Stefan,
I've done a bit of detective work and this is what I've found. Yes, I did have a duplicate Fuel offset (I was experimenting weeks ago and forgot to delete it.
So now the project compiles.
All of the switches work ie: Master Battery, avionics and alternator and fuel pump.
Interestingly, if I turn the fuel pump switch on, if I use any of the above switches,(except the Alternator switch) not only does it turn the switch that it's meant to turn on, but it also switches off the fuel pump.
It does the same even if I // out all lines relating to the fuel pump.
ok, in that case i would make an if - else like at the LEDīs.
Stefan,
Can you give me an example.
In the LEDs, I only have :
case FS_NAV1GSFLAG:
FsbusWrite (C_LEDGLIDESLOPEFLAG, val);
break;
Which I've used,
For the To/From LEDs, I have the if - else
case FS_NAV1TOFROM:
if (val==0)
{
FsbusWrite (C_LEDFROM, val);
FsbusWrite (C_LEDTO, val);
}
else if (val==1)
{
FsbusWrite (C_LEDFROM, 0);
FsbusWrite (C_LEDTO, 1);
}
else if (val==2)
{
FsbusWrite (C_LEDFROM, 1);
FsbusWrite (C_LEDTO, 0);
}
break;
But it's to light 2 leds from the one offset.
Thanks
David
case C_SWITCH_ALTERNATOR:
if (val==0)
FsWrite (FS_ALTERNATOR, 1);
else
FsWrite (FS_ALTERNATOR, 0);
break;
Thanks Stefan,
That works for all the switches but the same problem persists.
The Batt and Avionics switch turns off the fuel pump (that is whether you turn the switch on or off, if you turn the fuel pump switch on, whichever way your turn the Batt or Avionics switch, it turns the fuel pump off). It won't turn it on, it just turns it off.
Tha Master Alt switch does not turn the fuel pump off. I can't see what I've done differently for the Alt switch.
Any other thoughts?
Thanks
David
Ok, I'm totally confused.
I deleted all of my switches and started from scratch.
I moved the fuel pump switch to a different group completely, and re-wrote the Master switches from scratch.
The group that I moved the fuel pump to does not affect the fuel pump switch but the same ones as before still change the fuel pump ie: MasterBatt, MasterAvionics.
Very confusing.