Subject: Re: [Emc-developers] Best way to create a timeout in a component
>On 11/10/2015 10:21 PM, Marius Liebenberg wrote: >> I am always finding this difficult because I dont know the right way >>of >> going about this. >> I need to create a timeout of variable seconds long in a component. I >> have a pin of type float that holds the required timeout in seconds. >> Then I have a small switch statement to give me a place to do the >>count >> down in. >> The question is what is the best way to do the timeout inside the >>case >> statement. Any place to look at a sample will help as well. > >The oneshot component has a count-down timer in it: > >http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=src/hal/components/oneshot.comp;h=c138ae58b1d24fc6612f6bd7b64c0ca8ed2a3b2c;hb=HEAD > Very good example thanks Seb. > >-- >Sebastian Kuzminsky ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
