【bug】洗车机状态发送及洗车机操作
This commit is contained in:
parent
80b45be543
commit
f12b72cc04
@ -63,11 +63,11 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
xcjStates, err := collectXcjStates(vs.World, mapId)
|
fymStates, err := collectFymStates(vs.World, mapId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
fymStates, err := collectFymStates(vs.World, mapId)
|
xcjStates, err := collectXcjStates(vs.World, mapId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ func collectXcjStates(world ecs.World, mapId int32) ([]*state_proto.XcjState, er
|
|||||||
for _, xcj := range uidStructure.XcjIds {
|
for _, xcj := range uidStructure.XcjIds {
|
||||||
entry, ok := entity.GetEntityByUid(world, xcj.Uid)
|
entry, ok := entity.GetEntityByUid(world, xcj.Uid)
|
||||||
if ok {
|
if ok {
|
||||||
state := &state_proto.XcjState{}
|
state := &state_proto.XcjState{Id: xcj.CommonId}
|
||||||
xcjStates = append(xcjStates, state)
|
xcjStates = append(xcjStates, state)
|
||||||
//设置参数
|
//设置参数
|
||||||
var xcjParam *request_proto.XcjParam
|
var xcjParam *request_proto.XcjParam
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit eaa9de89c7a5028260e5efcadcd0a37999de0b80
|
Subproject commit 78f0ddfd2413bdac81d33ea2b199edaa4de9e6fb
|
@ -663,6 +663,8 @@ func getUidMapByType(uidData any, m interface{}) map[uint32]*elementIdStructure
|
|||||||
return (uidData.(*StationUidStructure)).IbpIds
|
return (uidData.(*StationUidStructure)).IbpIds
|
||||||
case *data_proto.GarageDoor:
|
case *data_proto.GarageDoor:
|
||||||
return (uidData.(*StationUidStructure)).CkmIds
|
return (uidData.(*StationUidStructure)).CkmIds
|
||||||
|
case *data_proto.CarWashing:
|
||||||
|
return (uidData.(*StationUidStructure)).XcjIds
|
||||||
default:
|
default:
|
||||||
panic(&dto.ErrorDto{Code: dto.ArgumentParseError, Message: "类型未映射字段"})
|
panic(&dto.ErrorDto{Code: dto.ArgumentParseError, Message: "类型未映射字段"})
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ func XcjOperation(simulation *VerifySimulation, req *request_proto.XcjOperationR
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setXcjParam(simulation *VerifySimulation, req *request_proto.XcjOperationReq) *sys_error.BusinessError {
|
func setXcjParam(simulation *VerifySimulation, req *request_proto.XcjOperationReq) *sys_error.BusinessError {
|
||||||
uid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &data_proto.GarageDoor{})
|
uid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &data_proto.CarWashing{})
|
||||||
result := <-ecs.Request[ecs.EmptyType](simulation.World, func() ecs.Result[ecs.EmptyType] {
|
result := <-ecs.Request[ecs.EmptyType](simulation.World, func() ecs.Result[ecs.EmptyType] {
|
||||||
wd := entity.GetWorldData(simulation.World)
|
wd := entity.GetWorldData(simulation.World)
|
||||||
entry, ok := wd.EntityMap[uid]
|
entry, ok := wd.EntityMap[uid]
|
||||||
|
Loading…
Reference in New Issue
Block a user