Changeset 54


Ignore:
Timestamp:
2012-02-24 19:04:24 (13 years ago)
Author:
mcvflorin
Message:
  • Really fixed: faulted zones aren't updated if the LuaUPnP is restarted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/UI4/L_VistaAlarmPanel1.lua ΒΆ

    r46 r54  
    968968    getTtl() 
    969969 
     970    -- Check if there are any faulted zones that need to be updated. 
     971    for zoneNo, zone in pairs(g_zones) do 
     972        local lastTrip = luup.variable_get(SID.SECURITY_SENSOR, "LastTrip", zone.device) or os.time() 
     973        if (os.difftime(os.time(), lastTrip) >= TTL) then 
     974            removeFaultedZone(zoneNo) 
     975        end 
     976    end 
     977 
    970978    -- Start the TTL timer. 
    971979    ttlCountdownTimer() 
Note: See TracChangeset for help on using the changeset viewer.