func GetElevFloorSensorSignal() int { if driver.Read_bit(driver.SENSOR1) { return 1 } else if driver.Read_bit(driver.SENSOR2) { return 2 } else if driver.Read_bit(driver.SENSOR3) { return 3 } else if driver.Read_bit(driver.SENSOR4) { return 4 } else { return -1 } }
func GetElevButtonSignal(button Elev_button, floor int) int { if driver.Read_bit(Button_channel_matrix[floor][button]) { return 1 } else { return 0 } }
func GetElevObstructionSignal() bool { return driver.Read_bit(driver.OBSTRUCTION) }
func GetElevStopSignal() bool { return driver.Read_bit(driver.STOP) }