[simpits-tech] EPL-code quest

Frank Riedel simpits-tech@simpits.org
Fri, 25 Jul 2003 08:23:36 +0200


Hey Mark and Rod !

Thanks for your help
i can do it now ;o)

All the best
Frank

----- Original Message -----
From: "Mark Doran" <mark_s_doran@hotmail.com>
To: <simpits-tech@simpits.org>
Sent: Friday, July 25, 2003 2:11 AM
Subject: RE: [simpits-tech] EPL-code quest


> Hi Frank:
>
> I don't think that's going to work for Falcon4 and a gear handle that
> works mechanically like the one in the F-16.  Logic looks wrong; your
> original looked closer actually...presuming the light we are talking
> about is the light in the end of the handle that lights only while the
> gear is moving.
>
> Can you say more about what you mean when you say it isn't working??  Is
> it just the delay length??  You had 300 but you need 150 for 3 seconds.
>
> Also, we may need to see the device structure definition that goes with
> the Land_Gear device to figure this out for you.
>
> As a programming style point, I'd recommend including the output bits in
> your device structure definitions -- that way you can give them symbolic
> names that are more obvious than "(0,1,0b10000000)"
>
>   device(Land_Gear) {
>     // connector definition
>     // input bits
>
>     // output bits
>     output(lamps, 0, 1) {
>       oHandle = 0b10000000;
>     }
>   };
>
> Then you can refer to the light in EPL procedures as:
>
>   Land_Gear.lamps.oHandle = on  // turn on the lamp
>   delay(150);  // wait 3 seconds
>   Land_Gear.lamps.oHandle = off // turn on the lamp again
>
> ...and what's more that means you only have to change code in one place
> if you have to move the lamp later to a different output bit...as
> opposed to editing every procedure that uses the "(0,1,0b10000000)"
> label for this output bit.
>
> Cheers,
>
> Mark.
>
>
> > -----Original Message-----
> > From: simpits-tech-admin@simpits.org [mailto:simpits-tech-
> > admin@simpits.org] On Behalf Of Frank Riedel
> > Sent: Wednesday, July 23, 2003 11:56 PM
> > To: simpits-tech@simpits.org
> > Subject: Re: [simpits-tech] EPL-code quest
> >
> > Hi Rod !
> > Will this code turn on the LED for 3 sec... and turn it off again when
> i
> > hit
> > "G" ??
> >
> > All the best
> > Frank
> >
> > ----- Original Message -----
> > From: "Rod Dale" <rodd@castle.net.au>
> > To: <simpits-tech@simpits.org>
> > Sent: Thursday, July 24, 2003 7:51 AM
> > Subject: Re: [simpits-tech] EPL-code quest
> >
> >
> > > Frank,
> > > Try :
> > >
> > > void Land_Gear.Landing_Gear.On(void)
> > > {
> > >
> > > keyhit(G);
> > >
> > > delay(300);
> > >
> > > setpoint(0,1,0b10000000);
> > >
> > > }
> > >
> > > void Land_Gear.Landing_Gear.Off(void)
> > >
> > > {
> > > keyhit(G);
> > >
> > > delay(300);
> > >
> > > clearpoint(0,1,0b10000000);
> > >
> > > }
> > >
> > > Rod
> > >
> > > At 08:50 PM 7/23/03 +0200, you wrote:
> > > >Hi All !
> > > >
> > > >I can't get this to work.... what do i do wrong ?
> > > >
> > > >void Land_Gear.Landing_Gear.On(void)
> > > >
> > > >{
> > > >
> > > >keyhit(G);
> > > >
> > > >setpoint(0,1,0b10000000);
> > > >
> > > >delay(300);
> > > >
> > > >clearpoint(0,1,0b10000000);
> > > >
> > > >}
> > > >
> > > >void Land_Gear.Landing_Gear.Off(void)
> > > >
> > > >{
> > > >
> > > >keyhit(G);
> > > >
> > > >setpoint(0,1,0b10000000);
> > > >
> > > >delay(300);
> > > >
> > > >clearpoint(0,1,0b10000000);
> > > >
> > > >}
> > > >
> > > >
> > > >
> > > >Frank
> > > >
> > > >
> > > >_______________________________________________
> > > >Simpits-tech mailing list
> > > >Simpits-tech@simpits.org
> > > >http://www.simpits.org/mailman/listinfo/simpits-tech
> > > >To unsubscribe, please see the instructions at the bottom of the
> above
> > > >page.  Thanks!
> > >
> > > _______________________________________________
> > > Simpits-tech mailing list
> > > Simpits-tech@simpits.org
> > > http://www.simpits.org/mailman/listinfo/simpits-tech
> > > To unsubscribe, please see the instructions at the bottom of the
> above
> > page.  Thanks!
> > >
>
> _______________________________________________
> Simpits-tech mailing list
> Simpits-tech@simpits.org
> http://www.simpits.org/mailman/listinfo/simpits-tech
> To unsubscribe, please see the instructions at the bottom of the above
page.  Thanks!