|
@@ -72,8 +72,14 @@ func Rule(shareVars *sync.Map, data *pjisuv_msgs.PerceptionLocalization) string
|
|
|
}()
|
|
|
if count1%10 == 0 {
|
|
|
Automode, _ := shareVars.Load("AutomodeOfPjVehicleFdbPub")
|
|
|
- Longitude, _ := shareVars.Load("EndPointX")
|
|
|
- Latitude, _ := shareVars.Load("EndPointY")
|
|
|
+ Longitude, ok1 := shareVars.Load("EndPointX")
|
|
|
+ if !ok1 {
|
|
|
+ Longitude = 0.0
|
|
|
+ }
|
|
|
+ Latitude, ok2 := shareVars.Load("EndPointY")
|
|
|
+ if !ok2 {
|
|
|
+ Latitude = 0.0
|
|
|
+ }
|
|
|
Automode = Automode.(int16)
|
|
|
EndPoint.Longitude = Longitude.(float64)
|
|
|
EndPoint.Latitude = Latitude.(float64)
|