Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Interrupt with gw.wait?

Interrupt with gw.wait?

Scheduled Pinned Locked Moved Development
3 Posts 3 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aloha
    wrote on last edited by
    #1

    Hi,

    Is it possible to interrupt the wait period when receiving an interrupt?

    I basically want to do this, but it's only available with gw.sleep.
    gw.wait(INTERRUPT,CHANGE, SLEEP_TIME);

    1 Reply Last reply
    0
    • F Offline
      F Offline
      frankiboy
      wrote on last edited by
      #2

      Agree.

      Not sure if we have the same use case, but in my case I have created a sensor node sketch, where the actual nodes are a mix of battery powered and net powered devices. Due to the size of the buildings I need to use repeaters, so I enable repeater mode for the net powered devices. (#define MY_REPEATER_FEATURE)

      Ideally, this define should take care of everything, but as far as I know, I need to change sleep to wait, and they don't behave the same. Therefore I end up with different behavior.

      The best solution might be if I wait would behave exactly the same as sleep, except that it does not enter sleep mode. And the sleep function could be smart enough to call wait instead of entering sleep when something prevents it from entering sleep mode (like MY_REPEATER_FEATURE), so I can keep the sketch unchanged when enabling repeater mode. (Note that I work on the 1.6b version)

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hek
        Admin
        wrote on last edited by
        #3

        @frankiboy

        Sounds reasonable. Al''add it to the TODO list.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        20

        Online

        12.0k

        Users

        11.2k

        Topics

        113.4k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular