滑动门状态增加{强制}字段
This commit is contained in:
parent
5086c8732a
commit
b624eeb3d8
@ -167,10 +167,11 @@ type AsdState struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Gmdw bool `protobuf:"varint,1,opt,name=gmdw,proto3" json:"gmdw,omitempty"` //关门到位(实际位置)
|
Gmdw bool `protobuf:"varint,1,opt,name=gmdw,proto3" json:"gmdw,omitempty"` //关门到位(实际位置)
|
||||||
Kmdw bool `protobuf:"varint,2,opt,name=kmdw,proto3" json:"kmdw,omitempty"` //开门到位(实际位置)
|
Kmdw bool `protobuf:"varint,2,opt,name=kmdw,proto3" json:"kmdw,omitempty"` //开门到位(实际位置)
|
||||||
Mgj bool `protobuf:"varint,3,opt,name=mgj,proto3" json:"mgj,omitempty"` //门关继电器
|
Mgj bool `protobuf:"varint,3,opt,name=mgj,proto3" json:"mgj,omitempty"` //门关继电器
|
||||||
Zaw bool `protobuf:"varint,4,opt,name=zaw,proto3" json:"zaw,omitempty"` //有障碍物
|
Zaw bool `protobuf:"varint,4,opt,name=zaw,proto3" json:"zaw,omitempty"` //有障碍物
|
||||||
|
Force bool `protobuf:"varint,5,opt,name=force,proto3" json:"force,omitempty"` //强制开/关门
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AsdState) Reset() {
|
func (x *AsdState) Reset() {
|
||||||
@ -233,6 +234,13 @@ func (x *AsdState) GetZaw() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *AsdState) GetForce() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Force
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
var File_component_psd_proto protoreflect.FileDescriptor
|
var File_component_psd_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_component_psd_proto_rawDesc = []byte{
|
var file_component_psd_proto_rawDesc = []byte{
|
||||||
@ -246,15 +254,16 @@ var file_component_psd_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x09, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a,
|
0x0a, 0x09, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a,
|
||||||
0x0e, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10,
|
0x0e, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10,
|
||||||
0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x4f, 0x70,
|
0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x73, 0x64, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x4f, 0x70,
|
||||||
0x65, 0x6e, 0x10, 0x02, 0x22, 0x56, 0x0a, 0x08, 0x41, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65,
|
0x65, 0x6e, 0x10, 0x02, 0x22, 0x6c, 0x0a, 0x08, 0x41, 0x73, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x67, 0x6d, 0x64, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
0x12, 0x12, 0x0a, 0x04, 0x67, 0x6d, 0x64, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
||||||
0x67, 0x6d, 0x64, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x6d, 0x64, 0x77, 0x18, 0x02, 0x20, 0x01,
|
0x67, 0x6d, 0x64, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x6d, 0x64, 0x77, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x28, 0x08, 0x52, 0x04, 0x6b, 0x6d, 0x64, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x67, 0x6a, 0x18,
|
0x28, 0x08, 0x52, 0x04, 0x6b, 0x6d, 0x64, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x67, 0x6a, 0x18,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6d, 0x67, 0x6a, 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x61,
|
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6d, 0x67, 0x6a, 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x61,
|
||||||
0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x7a, 0x61, 0x77, 0x42, 0x1d, 0x5a, 0x1b,
|
0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x7a, 0x61, 0x77, 0x12, 0x14, 0x0a, 0x05,
|
||||||
0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70,
|
0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72,
|
||||||
0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
0x63, 0x65, 0x42, 0x1d, 0x5a, 0x1b, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
|
||||||
0x74, 0x6f, 0x33,
|
0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -23,4 +23,5 @@ message AsdState {
|
|||||||
|
|
||||||
bool mgj = 3; //门关继电器
|
bool mgj = 3; //门关继电器
|
||||||
bool zaw = 4; //有障碍物
|
bool zaw = 4; //有障碍物
|
||||||
|
bool force = 5; //强制开/关门
|
||||||
}
|
}
|
@ -70,10 +70,8 @@ func (s *AsdSys) Update(world ecs.World) {
|
|||||||
asdState.Gmdw = false
|
asdState.Gmdw = false
|
||||||
}
|
}
|
||||||
//障碍物
|
//障碍物
|
||||||
if entry.HasComponent(component.AsdHasObstacleTag) {
|
asdState.Zaw = entry.HasComponent(component.AsdHasObstacleTag)
|
||||||
asdState.Zaw = true
|
//强制开/关门
|
||||||
} else {
|
asdState.Force = entry.HasComponent(component.AsdForceType)
|
||||||
asdState.Zaw = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user