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

17 lines
432 B
Go
Raw Normal View History

package memory
import (
"joylink.club/rtsssimulation/fi"
)
// 操作PSL按钮
2023-12-14 13:04:48 +08:00
func ChangePSLButtonState(sim *VerifySimulation, mapId int32, gateBoxId uint32, btnCode string, pressDown bool) {
uid := QueryUidStructure[*StationUidStructure](mapId)
2024-02-20 09:20:52 +08:00
gateBoxUid := uid.PslIds[gateBoxId].Uid
if pressDown {
fi.PressDownButton(sim.World, gateBoxUid+"_"+btnCode)
} else {
fi.PressUpButton(sim.World, gateBoxUid+"_"+btnCode)
}
}