Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programming question regarding state variable changes

Featured Replies

Posted

I have a state variable called sLastAction - it is set to an integer value which represents, as the name suggests, the most recent "action" that happened in my house - an "action" can be a motion sensor turning on, a wall switch being turned on or off, a Harmony remote control activity starting, door opening, security zone being triggered, etc... - several programs rely on this variable being a specific value to run - they all contain an if statement similar the following "if sLastAction = 128 then..." - my question is:

What happens if the variable changes twice rapidly before the first program testing the first value gets to run?

Will that program be put into a queue so that it is guaranteed to run?  And the test condition will still be true?

Sorry, if this has been asked before

 

 

 

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.