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

17 lines
422 B
Go

package memory
import (
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
"joylink.club/rtsssimulation/fi"
)
// 操作esb按钮
func ChangeEsbButtonState(sim *VerifySimulation, mapId int32, btnId string, pressDown bool) error {
uid := QueryUidByMidAndComId(mapId, btnId, &graphicData.EsbButton{})
if pressDown {
return fi.PressDownButton(sim.World, uid)
} else {
return fi.PressUpButton(sim.World, uid)
}
}