Пример #1
0
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
	}

}
Пример #2
0
func GetElevButtonSignal(button Elev_button, floor int) int {
	if driver.Read_bit(Button_channel_matrix[floor][button]) {
		return 1
	} else {
		return 0
	}
}
Пример #3
0
func GetElevObstructionSignal() bool {
	return driver.Read_bit(driver.OBSTRUCTION)
}
Пример #4
0
func GetElevStopSignal() bool {
	return driver.Read_bit(driver.STOP)
}