[修改]区段、Link、运营方向/位置之间互相转换的函数的bug

This commit is contained in:
thesai 2024-05-17 14:38:13 +08:00
parent a613ac109b
commit 468cc78964

View File

@ -44,6 +44,10 @@ type Turnout struct {
componentGroups []*ElectronicComponentGroup
}
func (t *Turnout) Km() *proto.Kilometer {
return t.km
}
func NewTurnout(id string, km *proto.Kilometer, switchMachineType proto.Turnout_SwitchMachineType) *Turnout {
return &Turnout{
Identity: identity{id, proto.DeviceType_DeviceType_Turnout},