示例#1
0
//Light functions
func setLights(lightArray [driver.N_BUTTONS][driver.N_FLOORS]int) {
	driver.Elev_set_floor_indicator(currentFloor)
	for i := 0; i < driver.N_BUTTONS; i++ {
		for j := 0; j < driver.N_FLOORS; j++ {
			driver.Elev_set_button_lamp(driver.Elev_button_type_t(i), j, lightArray[i][j])
		}
	}
}
示例#2
0
func syncLights() {
	for {
		button := <-def.SyncLight
		driver.Elev_set_button_lamp(button)
	}
}