// 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() }
// 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() }
func ElevStart(dir Elev_dir) { C.elev_set_motor_direction(C.elev_motor_direction_t(dir)) }
// Stop stops the elevator func Stop() { mutex.Lock() C.elev_set_motor_direction(0) mutex.Unlock() }
func Set_motor_dir(dirn int) { C.elev_set_motor_direction(C.elev_motor_direction_t(dirn)) }
func liftDriver_setMotorDirection(direction int) { C.elev_set_motor_direction(C.elev_motor_direction_t(direction)) }
func Elevator_set_motor_direction(direction Motor_direction) { C.elev_set_motor_direction(C.elev_motor_direction_t(direction)) }
func LiftDriver_SetMotorDirection(direction types.MotorDirection) { C.elev_set_motor_direction(C.elev_motor_direction_t(C.int(direction))) }
func ElevSetMotorDirection(motorDirection int) { (C.elev_set_motor_direction(C.elev_motor_direction_t(C.int(motorDirection)))) }
func Elev_set_motor_direction(dirn Elev_motor_direction_t) { C.elev_set_motor_direction(C.elev_motor_direction_t(dirn)) }
func SetMotorDirection(dirn MotorDirection) { C.elev_set_motor_direction(C.elev_motor_direction_t(dirn)) }
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() }