修改道岔定/反操驱动接口

This commit is contained in:
walker 2023-10-07 09:46:50 +08:00
parent fb8df164f9
commit 341bbcc05d
2 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,8 @@ func LoadTurnouts(w ecs.World) error {
panic(fmt.Sprintf("id=%s的道岔没有转辙机型号数据", turnout.Id()))
}
if err != nil {
return err
fmt.Println("加载道岔异常:", err.Error())
// return err
}
}
return nil
@ -35,7 +36,7 @@ func LoadTurnouts(w ecs.World) error {
// 加载道岔ZDJ9单机转辙机
func LoadTurnoutZdj9One(w ecs.World, turnout *repository.Turnout, entry *ecs.Entry) error {
panic("unimplemented")
panic("道岔ZDJ9单机转辙机加载未实现")
}
// 加载道岔ZDJ9双机转辙机

View File

@ -23,7 +23,9 @@ func driveTurnoutZzj(w ecs.World, id string, dc bool, on bool) {
ycj.Td = on
if dc {
dcj.Td = on
fcj.Td = !on
} else {
dcj.Td = !on
fcj.Td = on
}
} else { // 无电路,直接驱动转辙机