|
@@ -736,21 +736,13 @@ func ProduceWindow() {
|
|
|
}
|
|
|
subscribersTimeMutexes[i].Unlock()
|
|
|
// 更新共享变量
|
|
|
- mutexOfCicvLocation.RLock()
|
|
|
- {
|
|
|
- //shareVars.Store("VelocityXOfCicvLocation",data.VelocityX) pjisuvParam以后不要新加全局变量了,采用这种方式添加
|
|
|
- //value, _ := shareVars.Load("VelocityXOfCicvLocation") 在Rule函数数中通过Load方法获取全局变量,获取之后通过value.(float64)方法转换数据类型
|
|
|
- //s := value.(float64)
|
|
|
-
|
|
|
- pjisuvParam.VelocityXOfCicvLocation = data.VelocityX
|
|
|
- pjisuvParam.VelocityYOfCicvLocation = data.VelocityY
|
|
|
- pjisuvParam.VelocityZOfCicvLocation = data.VelocityZ
|
|
|
- pjisuvParam.YawOfCicvLocation = data.Yaw
|
|
|
- pjisuvParam.AngularVelocityZOfCicvLocation = data.AngularVelocityZ
|
|
|
- pjisuvParam.PositionXOfCicvLocation = data.PositionX
|
|
|
- pjisuvParam.PositionYOfCicvLocation = data.PositionY
|
|
|
- }
|
|
|
- mutexOfCicvLocation.RUnlock()
|
|
|
+ shareVars.Store("VelocityXOfCicvLocation", data.VelocityX)
|
|
|
+ shareVars.Store("VelocityYOfCicvLocation", data.VelocityY)
|
|
|
+ shareVars.Store("VelocityZOfCicvLocation", data.VelocityZ)
|
|
|
+ shareVars.Store("YawOfCicvLocation", data.Yaw)
|
|
|
+ shareVars.Store("AngularVelocityZOfCicvLocation", data.AngularVelocityZ)
|
|
|
+ shareVars.Store("PositionXOfCicvLocation", data.PositionX)
|
|
|
+ shareVars.Store("PositionYOfCicvLocation", data.PositionY)
|
|
|
},
|
|
|
})
|
|
|
}
|