Beispiel #1
0
func setAllLights() {
	for floor := 0; floor < Driver.NUMFLOORS; floor++ {
		for btn := 0; btn < Driver.NUMBUTTONS; btn++ {
			if btn == int(B_Cab) {
				Driver.ElevSetButtonLight(btn, floor, elevator.Requests[floor][btn])
			} else {
				Driver.ElevSetButtonLight(btn, floor, allExtBtns[floor][btn])
			}
		}
	}
}
Beispiel #2
0
func SetAllLights(e Elevator) {
	for floor := 0; floor < driver.NUMFLOORS; floor++ {
		for btn := 0; btn < 3; btn++ { //added request OR order
			driver.ElevSetButtonLight(btn, floor, e.MasterOrders[floor][btn] || e.LocalRequests[floor][btn])
		}
	}
}