func RunBottomFloor() { if GetFloorSignal() != 0 { C.io_set_bit(C.MOTORDIR) //time.Sleep(time.Second * 1) C.io_write_analog(C.MOTOR, 2800) for C.io_read_bit(C.SENSOR_FLOOR1) == 0 { SetFloorIndicator(GetFloorSignal()) time.Sleep(time.Millisecond * 200) } SetFloorIndicator(GetFloorSignal()) C.io_write_analog(C.MOTOR, 0) } }
func Io_write_analog(channel int, value int) { C.io_write_analog(C.int(channel), C.int(value)) }
func ioWriteAnalog(channel, value int) { C.io_write_analog(C.int(channel), C.int(value)) }
func RunStop() { C.io_write_analog(C.MOTOR, 0) }
func RunDown() { C.io_set_bit(C.MOTORDIR) //time.Sleep(time.Second * 1) C.io_write_analog(C.MOTOR, 2800) }
func RunUp() { C.io_clear_bit(C.MOTORDIR) //time.Sleep(time.Second * 1) C.io_write_analog(C.MOTOR, 2800) }
func io_writeAnalog(channel, value int) { _, err := C.io_write_analog(C.int(channel), C.int(value)) checkError(err) }