修改屏蔽门操作请求
This commit is contained in:
parent
fa7211d7bd
commit
2879914757
@ -65,6 +65,12 @@ type AsdMotorState struct {
|
||||
|
||||
var AsdStateType = ecs.NewComponentType[component_proto.AsdState]()
|
||||
|
||||
// AsdForceType ture强制开门 false强制关门
|
||||
var AsdForceType = ecs.NewComponentType[BitState]()
|
||||
|
||||
// AsdHasObstacleTag 滑动门有障碍物
|
||||
var AsdHasObstacleTag = ecs.NewTag()
|
||||
|
||||
var PlatformMkxCircuitType = ecs.NewComponentType[PlatformMkxCircuit]()
|
||||
|
||||
// PlatformMkxCircuit 站台门控箱电路
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8a028e6405150dada3caa4c90f34ebf93aef6163
|
||||
Subproject commit 9c5dde7b2ec28c555488eee7dec81bb1f612c443
|
@ -51,7 +51,12 @@ func (s *AsdSys) Update(world ecs.World) {
|
||||
}
|
||||
}
|
||||
//门关继电器状态
|
||||
psdMotorState.MG = pos == consts.TwoPosMin
|
||||
if entry.HasComponent(component.AsdForceType) {
|
||||
force := component.AsdForceType.Get(entry)
|
||||
psdMotorState.MG = !force.Val
|
||||
} else {
|
||||
psdMotorState.MG = pos == consts.TwoPosMin
|
||||
}
|
||||
asdState.Mgj = psdMotorState.MG
|
||||
//滑动门状态
|
||||
if pos == consts.TwoPosMax {
|
||||
|
Loading…
Reference in New Issue
Block a user