protected void execute() { if(this.timeSinceInitialized()<Robot.harvesterRollers.SHOOTER_SHOOT_SPINUP_TIME){ Robot.harvesterRollers.setBallControl(Robot.harvesterRollers.HARVESTER_HARVEST_V_BUS*12/ControllerPower.getInputVoltage()); }else{ Robot.harvesterRollers.setBallControl(0); } Robot.harvesterRollers.setShooter(-10/ControllerPower.getInputVoltage()); }
/** * Get the current reading of the potentiometer. * * @return The current position of the potentiometer. */ public double get() { if(m_analog_input.onRIO) { return (m_analog_input.get() / ControllerPower.getVoltage5V()) * m_fullRange + m_offset; } else { return m_analog_input.get() * m_fullRange + m_offset; } }
public double getRaw() { if(m_analog_input.onRIO) { return m_analog_input.get() / ControllerPower.getVoltage5V(); } else { return m_analog_input.get(); } }
@Override public void tick_update() { update++; if (update >= 2) { if (!ControllerPower.getEnabled6V() || !ControllerPower.getEnabled3V3() || !ControllerPower.getEnabled5V()) setColor(100, 33, 33); else setColor(33, 33, 33); update(); } }
protected void execute() { Robot.harvesterRollers.setShooter(-10/ControllerPower.getInputVoltage()); Robot.harvesterRollers.setBallControl(Robot.harvesterRollers.HARVESTER_DISCHARGE_BALL_V_BUS); }