Ignore:
Timestamp:
04/16/09 07:14:29 (3 years ago)
Author:
james
Message:

misc small fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/system.tcl

    r986 r997  
    119119        if {$last_event == 0} { 
    120120                bMotion_putloglev d * "last event info for $channel not available" 
     121                # force it to be now 
     122                set bMotionLastEvent($channel) [clock seconds] 
    121123                # assume we're ok 
    122124                return 1 
     
    10031005                        catch { 
    10041006                                foreach chan $bMotionChannels { 
    1005                                         if [bMotion_is_active_enough $chan] { 
     1007                                        if [bMotion_did_i_speak_last $chan] { 
    10061008                                                bMotion_putloglev 3 * "sending sleeping output to $chan" 
    1007                                                 bMotionDoAction $chan "" "%VAR{go_sleeps}" 
     1009                                                if [rand 2] { 
     1010                                                        bMotionDoAction $chan "" "%VAR{go_sleeps}" 
     1011                                                } 
    10081012                                        } 
    10091013                                } 
     
    10411045                                if {![bMotion_did_i_speak_last $chan]} { 
    10421046                                        bMotion_putloglev 3 * "sending waking output to $chan" 
    1043                                         bMotionDoAction $chan "" "%VAR{wake_ups}" 
     1047                                        if [rand 2] { 
     1048                                                bMotionDoAction $chan "" "%VAR{wake_ups}" 
     1049                                        } 
    10441050                                } 
    10451051                        } 
     
    11221128proc bMotion_did_i_speak_last { channel } { 
    11231129        global bMotionCache 
     1130 
     1131        bMotion_putloglev d * "Checking if I spoke last in $channel" 
    11241132         
    11251133        catch { 
     1134                bMotion_putloglev 1 * "Cache(last) for $channel is $bMotionCache($channel,last)" 
    11261135                return $bMotionCache($channel,last) 
    11271136        } 
Note: See TracChangeset for help on using the changeset viewer.