Stopping repeated messages


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Stopping repeated messages

    I usually have at least 1 byte dedicated to flagss, so
    Code:
    myflags var byte
    then to set up the flags its just this:
    Code:
    alarm1F var myflags.0
    alarm2F var myflags.1
    alarm3F var myflags.2
    ...
    then to use them it is this simple:
    Code:
    alarm1F = 1
    alarm2F = 0
    ...
    
    or 
    myflags = 0 'this clears all flags
    then for you case:
    Code:
    if portb.0 then 
     gosub alarm1
    else
     alarm1F = 0
    endif
    ...
    return
    
    
    alarm1:
     if alarm1F then return
     alarm1F = 1
     hser bla bla bla
    hope that helps
    Last edited by cncmachineguy; - 20th October 2011 at 19:38.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Jan 2010
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: Stopping repeated messages

    Pure Gold! Thank you!

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts