示例#1
0
// RunDown runs down
func RunDown() {
	if getFloor() == 0 {
		log.Error("Trying to go down from the bottom floor?!")
		return
	}
	mutex.Lock()
	C.elev_set_motor_direction(-1)
	mutex.Unlock()
}
示例#2
0
// RunUp runs up
func RunUp() {
	if getFloor() == NumFloors-1 {
		log.Error("Trying to go up from the top floor?!")
		return
	}
	mutex.Lock()
	C.elev_set_motor_direction(1)
	mutex.Unlock()
}
示例#3
0
文件: driver.go 项目: torees/Sanntid
func ElevStart(dir Elev_dir) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(dir))
}
示例#4
0
// Stop stops the elevator
func Stop() {
	mutex.Lock()
	C.elev_set_motor_direction(0)
	mutex.Unlock()
}
示例#5
0
文件: elev.go 项目: Aarvold/Heismappe
func Set_motor_dir(dirn int) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(dirn))
}
示例#6
0
func liftDriver_setMotorDirection(direction int) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(direction))
}
示例#7
0
func Elevator_set_motor_direction(direction Motor_direction) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(direction))
}
示例#8
0
func LiftDriver_SetMotorDirection(direction types.MotorDirection) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(C.int(direction)))
}
示例#9
0
文件: driver.go 项目: graesj/sanntid
func ElevSetMotorDirection(motorDirection int) {
	(C.elev_set_motor_direction(C.elev_motor_direction_t(C.int(motorDirection))))
}
示例#10
0
func Elev_set_motor_direction(dirn Elev_motor_direction_t) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(dirn))
}
示例#11
0
文件: driver.go 项目: audunel/TTK4145
func SetMotorDirection(dirn MotorDirection) {
	C.elev_set_motor_direction(C.elev_motor_direction_t(dirn))
}
示例#12
0
func Elev_set_motor_direction(dirn C.struct_elev_motor_direction_t){ //dobbeltsjekk om C.struct... er en god løsning for å importere typedef's fra C
	C.elev_set_motor_direction()
}