From: Bernhard Tittelbach Date: Tue, 8 Oct 2013 20:33:35 +0000 (+0000) Subject: --bug X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=0c8c69e28651b7fecbfe19ee830a442b94a20992;p=svn42.git --bug --- diff --git a/go/r3-eventbroker_zmq/metamovement.go b/go/r3-eventbroker_zmq/metamovement.go index a24d4ed..3ccfd72 100644 --- 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()