projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b07f141
)
--bug
author
Bernhard Tittelbach
<xro@realraum.at>
Tue, 8 Oct 2013 20:33:35 +0000
(20:33 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Tue, 8 Oct 2013 20:33:35 +0000
(20:33 +0000)
go/r3-eventbroker_zmq/metamovement.go
patch
|
blob
|
history
diff --git
a/go/r3-eventbroker_zmq/metamovement.go
b/go/r3-eventbroker_zmq/metamovement.go
index
a24d4ed
..
3ccfd72
100644
(file)
--- a/
go/r3-eventbroker_zmq/metamovement.go
+++ b/
go/r3-eventbroker_zmq/metamovement.go
@@
-30,7
+30,11
@@
func MetaEventRoutine_Movement(ps *pubsub.PubSub, granularity, gran_duration int
case event := <- events_chan:
switch event.(type) {
case r3events.MovementSensorUpdate:
- movement_window.Value = (uint32) (movement_window.Value.(uint32) + 1)
+ if movement_window.Value == nil {
+ movement_window.Value = uint32(1)
+ } else {
+ movement_window.Value = uint32(movement_window.Value.(uint32) + 1)
+ }
}
case gots := <- myticker.C:
ts := gots.Unix()