Example #1
0
func SetElevFloorIndicator(floor int) {
	//one light sould be on
	if floor == 3 || floor == 4 {
		driver.Set_bit(driver.FLOOR_IND1)
	} else {
		driver.Clear_bit(driver.FLOOR_IND1)
	}
	if floor == 2 || floor == 4 {
		driver.Set_bit(driver.FLOOR_IND2)
	} else {
		driver.Clear_bit(driver.FLOOR_IND2)
	}
}
Example #2
0
func SetElevStopLamp(value int) {
	if value == 1 {
		driver.Set_bit(drivers.LIGHT_STOP)
	} else {
		driver.Clear_bit(drivers.LIGHT_STOP)
	}
}
Example #3
0
func SetElevDoorOpenLamp(value int) {
	if value == 1 {
		driver.Set_bit(driver.DOOR_OPEN)
	} else {
		driver.Clear_bit(driver.DOOR_OPEN)
	}
}
Example #4
0
func SetElevButtonLamp(button Elev_button, floor int, value int) {
	if value == 1 {
		driver.Set_bit(Lamp_channel_matrix[floor][button])
	} else {
		driver.Clear_bit(Lamp_channel_matrix[floor][button])
	}
}