@Override public void destroy() { drivetrain.free(); if(sidewaysMotor instanceof SensorBase){ SensorBase motor = (SensorBase) sidewaysMotor; motor.free(); } }
public void free() { for (int i = 0; i < motors.length; i++) { if (motors[i] instanceof SensorBase) { SensorBase motor = (SensorBase) motors[i]; motor.free(); } } }
public void destroy() { if(speedController instanceof SensorBase){ SensorBase motor = (SensorBase) speedController; motor.free(); } solenoid.free(); }
public void destroy() { if(motorController instanceof SensorBase){ SensorBase motor = (SensorBase) motorController; motor.free(); } intakeLift.free(); intakeLift2.free(); }
@Override public void free() { for (int i = 0; i < motors.length; i++) { if (motors[i] instanceof SensorBase) { SensorBase motor = (SensorBase) motors[i]; motor.free(); } } }
@Override public double getFrequency() { return (SensorBase.kSystemClockTicksPerMicrosecond * 1e3) / DIOJNI.getLoopTiming(); }
public ToggleInputEvent(final SensorBase sensor, final boolean toggle) { super(sensor); this.toggle = toggle; }
public InputEvent(final SensorBase source) { this.source = source; }
public NumberInputEvent(final SensorBase sensor, final double number) { super(sensor); this.number = number; }
/** * Returns the sensor giving an input in this event. * * @return The sensor giving an input in this event. */ public final SensorBase getSource() { return source; }
/** * Initialize SPI bus<br> * Only call this method once in the program * * @param clkChannel The channel of the digital output for the clock signal. * @param mosiChannel The channel of the digital output for the written data to the slave * (master-out slave-in). * @param misoChannel The channel of the digital input for the input data from the slave * (master-in slave-out). */ public static void initBus(final int clkChannel, final int mosiChannel, final int misoChannel) { initBus(SensorBase.getDefaultDigitalModule(), clkChannel, mosiChannel, misoChannel); }