Changeset 997 for trunk/modules/system.tcl
- Timestamp:
- 04/16/09 07:14:29 (3 years ago)
- File:
-
- 1 edited
-
trunk/modules/system.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/system.tcl
r986 r997 119 119 if {$last_event == 0} { 120 120 bMotion_putloglev d * "last event info for $channel not available" 121 # force it to be now 122 set bMotionLastEvent($channel) [clock seconds] 121 123 # assume we're ok 122 124 return 1 … … 1003 1005 catch { 1004 1006 foreach chan $bMotionChannels { 1005 if [bMotion_ is_active_enough$chan] {1007 if [bMotion_did_i_speak_last $chan] { 1006 1008 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 } 1008 1012 } 1009 1013 } … … 1041 1045 if {![bMotion_did_i_speak_last $chan]} { 1042 1046 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 } 1044 1050 } 1045 1051 } … … 1122 1128 proc bMotion_did_i_speak_last { channel } { 1123 1129 global bMotionCache 1130 1131 bMotion_putloglev d * "Checking if I spoke last in $channel" 1124 1132 1125 1133 catch { 1134 bMotion_putloglev 1 * "Cache(last) for $channel is $bMotionCache($channel,last)" 1126 1135 return $bMotionCache($channel,last) 1127 1136 }
Note: See TracChangeset
for help on using the changeset viewer.
