rts-sim-testing-service/ts/simulation/wayside/memory/wayside_memory_station.go

17 lines
414 B
Go
Raw Normal View History

2023-10-18 13:53:17 +08:00
package memory
import (
"joylink.club/bj-rtsts-server/dto/data_proto"
2023-10-18 13:53:17 +08:00
"joylink.club/rtsssimulation/fi"
)
// 操作esb按钮
2023-12-14 13:04:48 +08:00
func ChangeEsbButtonState(sim *VerifySimulation, mapId int32, btnId uint32, pressDown bool) error {
uid := QueryUidByMidAndComId(mapId, btnId, &data_proto.EsbButton{})
2023-10-18 13:53:17 +08:00
if pressDown {
return fi.PressDownButton(sim.World, uid)
2023-10-18 13:53:17 +08:00
} else {
return fi.PressUpButton(sim.World, uid)
2023-10-18 13:53:17 +08:00
}
}