列车应答器天线探测轨旁应答器
This commit is contained in:
parent
ee7492c580
commit
00fb360d81
@ -28,8 +28,17 @@ func (t *TrainPositionInfo) ToString() string {
|
|||||||
|
|
||||||
// TrainBtm 列车应答器传输模块
|
// TrainBtm 列车应答器传输模块
|
||||||
type TrainBtm struct {
|
type TrainBtm struct {
|
||||||
|
//车载应答器天线功率放大器开关,true-开,false-关
|
||||||
|
PowerAmplifierSwitch bool
|
||||||
|
//应答器计数(每过一个应答器加一,在同一个应答器内不变)
|
||||||
|
BaliseCounter int
|
||||||
|
//报文计数器(每解出一个应答器报文加一)
|
||||||
|
MessageCounter int
|
||||||
|
//BTM此时是否在应答器上方
|
||||||
|
AboveBalise bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
TrainPositionInfoType = ecs.NewComponentType[TrainPositionInfo]()
|
TrainPositionInfoType = ecs.NewComponentType[TrainPositionInfo]()
|
||||||
|
TrainBtmType = ecs.NewComponentType[TrainBtm]()
|
||||||
)
|
)
|
||||||
|
@ -15,7 +15,7 @@ type BaliseDetectSystem struct {
|
|||||||
|
|
||||||
func NewBaliseDetectSystem() *BaliseDetectSystem {
|
func NewBaliseDetectSystem() *BaliseDetectSystem {
|
||||||
return &BaliseDetectSystem{
|
return &BaliseDetectSystem{
|
||||||
trainQuery: ecs.NewQuery(filter.Contains(component.UidType, component.TrainPositionInfoType)),
|
trainQuery: ecs.NewQuery(filter.Contains(component.UidType, component.TrainPositionInfoType, component.TrainBtmType)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (s *BaliseDetectSystem) Update(w ecs.World) {
|
func (s *BaliseDetectSystem) Update(w ecs.World) {
|
||||||
|
Loading…
Reference in New Issue
Block a user