hehe, that sounds crazy but it is good.
I like to help.
Regards,
Stefan
Printable View
hehe, that sounds crazy but it is good.
I like to help.
Regards,
Stefan
Hi Stefan,
Back in the land of the internet. Been away for the weekend.
I am now programming in the GS Indicator (LED) and the To/From (2 leds) indicators.
This is what I am declaring in stdafx.h
#define FL_NAV1GSFLAG OID_GAUGES_GROUP +13
#define C_LEDGLIDESLOPEFLAG OID_GAUGES_GROUP +14
Then in Gauges.cpp
MkFsbusObject (BTP_D_OUT, C_LEDGLIDESLOPEFLAG,"Glideslope Flag LED",cbGauges,22,51);
MkFsObject(FS_NAV1GSFLAG,"Glideslope Flag LED",cbGauges, 0x0C4C, 1, TP_I8, FS_NORMAL);
What do I need to enter ie: **I know this isn't correct, it's just a copy and paste of an example as I'm not sure what it should say.
staticvoid GlideslopeflagLed()
{
for (int i=0; i<8; i++)
{
switch (i)
{
case 0:
FsbusWrite (C_LEDGLIDESLOPEFLAG, (ra & (1<<I)) 1:0 ? font );<>
break;
Next question:
The To/From flags.
I can only find this offset:
MkFsObject(FS_NAV1TOFROM, "", cb__, 0x0C4B, 1, TP_I8, FS_NONE);
So how do I make this offset trigger one led for "to" and a different led for "from"
As always, thanks for your help.
David
Hi,
The Led output i do diferent.
case FS_NAV1GSFLAG:
FsbusWrite (C_LEDGLIDESLOPEFLAG, val);
break;
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;
Try that.
Regards,
Stefan
Hi Stefan,
Looks pretty good.
I'm getting 1 error on compiling:
gauges.cpp(91) : error C2196: case value '493' already used
Which is this line:
case FS_NAV1GSFLAG:
FsbusWrite (C_LEDGLIDESLOPEFLAG,val);
break;
I have to also have a good look at my DIO board as the voltage coming out of J5 and J4 is only 0.2 volts. I am using 180 ohm resistors, so there is not enough voltage to light the leds (any thoughts on this one?)
Do you have an other "case FS_NAV1GSFLAG:" line??Quote:
gauges.cpp(91) : error C2196: case value '493' already used
You are sure that the right jumper is closed?Quote:
J5 and J4 is only 0.2 volts.
Regards,
Stefan
No, there is only 1 case FS_NAV1GSFLAG: line.
<quote>J5 and J4 is only 0.2 volts.
You are sure that the right jumper is closed?</quote>
What do you mean by "right Jumper" should I have a shunt on a jumper somewhere to boost the voltage?
David
Hi,
in you Project is the case value already used. You have to find where.
Please look to the Schematic Drawing of the DIO Board (Doku page 5).
There you can see, J14 and J15 with this Jumpery you can give 5V to J4 and J5.
Regrads,
Stefan
By case value do you mean:
case FS_NAV1GSFLAG:
This entire line? If so, it doesn't appear anywhere else in my project.
On the DIO board, do I need to jumper J14 and J15 (if so which pins?) or do I need to supply external power?
Is it possible that you have "OID_GAUGES_GROUP +13" at 2 diferent objekts?Quote:
This entire line? If so, it doesn't appear anywhere else in my project.
Look at the picture from Robs website, there are the right jumper position.Quote:
On the DIO board, do I need to jumper J14 and J15 (if so which pins?) or do I need to supply external power?
Picture
Regards,
Stefan