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) } }
func SetElevStopLamp(value int) { if value == 1 { driver.Set_bit(drivers.LIGHT_STOP) } else { driver.Clear_bit(drivers.LIGHT_STOP) } }
func SetElevDoorOpenLamp(value int) { if value == 1 { driver.Set_bit(driver.DOOR_OPEN) } else { driver.Clear_bit(driver.DOOR_OPEN) } }
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]) } }