应答器增加可变报文状态及操作

This commit is contained in:
joylink_zhangsai 2024-01-24 17:45:15 +08:00
parent 247003d00b
commit 7372a5fa72
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,9 @@ func newBaliseEntity(w ecs.World, td *repository.Transponder, worldData *compone
Telegram: td.FixedTelegram(), Telegram: td.FixedTelegram(),
UserTelegram: td.FixedUserTelegram(), UserTelegram: td.FixedUserTelegram(),
}) })
if proto.Transponder_IB == td.BaliseType() || proto.Transponder_VB == td.BaliseType() {
entry.AddComponent(component.BaliseVariableTelegramType)
}
component.LinkPositionType.SetValue(entry, component_data.LinkPosition{ component.LinkPositionType.SetValue(entry, component_data.LinkPosition{
LinkId: td.LinkPosition().Link().Id(), LinkId: td.LinkPosition().Link().Id(),
Offset: td.LinkPosition().Offset(), Offset: td.LinkPosition().Offset(),

View File

@ -43,3 +43,7 @@ func (t *Transponder) LinkPosition() *LinkPosition {
func (t *Transponder) Km() *proto.Kilometer { func (t *Transponder) Km() *proto.Kilometer {
return t.km return t.km
} }
func (t *Transponder) BaliseType() proto.Transponder_Type {
return t.baliseType
}