@@ -0,0 +1,926 @@
+package com.team254.lib.util;%0A%0Aimport edu.wpi.first.wpilibj.DigitalInput;%0Aimport edu.wpi.first.wpilibj.Relay;%0A%0Apublic class CheesyCompressor %7B%0A%09public static int UPDATE_HZ = 25;%0A%09protected Relay m_compressor_relay;%0A%09protected DigitalInput m_pressure_switch;%0A%0A%09Loopable updater = new Loopable() %7B%0A%09%09@Override%0A%09%09public void update() %7B%0A%09%09%09boolean turn_on = m_pressure_switch.get();%0A%09%09%09m_compressor_relay.set(turn_on ? Relay.Value.kOn : Relay.Value.kOff);%0A%09%09%7D%0A%09%7D;%0A%0A%09protected Looper looper = new Looper(%22Compressor%22, updater, 1.0 / (UPDATE_HZ * 1.0));%0A%0A%09public CheesyCompressor(Relay compressor_relay, DigitalInput pressure_switch) %7B%0A%09%09m_compressor_relay = compressor_relay;%0A%09%09m_pressure_switch = pressure_switch;%0A%09%09m_compressor_relay.setDirection(Relay.Direction.kForward);%0A%09%09looper.start();%0A%09%7D%0A%0A%09public void start() %7B%0A%09%09looper.start();%0A%09%7D%0A%0A%09public void stop() %7B%0A%09%09looper.stop();%0A%09%09m_compressor_relay.set(Relay.Value.kOff);%0A%09%7D%0A%7D%0A

Add CheesyCompressor