示例#1
0
//ASK STUDASS
func LiftDriver_GetMotorDirection() types.MotorDirection {
	dir := int(C.elev_get_motor_direction())
	if dir == -1 {
		return types.MotorDirection_DOWN
	} else if dir == 0 {
		return types.MotorDirection_STOP
	} else {
		return types.MotorDirection_UP
	}
}
示例#2
0
文件: io.go 项目: Henriknv/Heis
func Elev_get_motor_direction() int {
	return int(C.elev_get_motor_direction())
}