Buggy code:
public class Clamp { public static final boolean MODE_SPEED = true ; public static final boolean MODE_HEIGHT = false ; public static FloatStatus height = new FloatStatus ( ) ; public static FloatStatus speed = new FloatStatus ( ) ; public static BooleanStatus mode = new BooleanStatus ( ) ; public static final BooleanStatus openControl = new BooleanStatus ( Igneous . makeSolenoid ( 3 ) ) ; public static final EventOutput setBottom = EventMixing . combine ( Clamp . mode . getSetFalseEvent ( ) , Clamp . height . getSetEvent ( 0 ) ) ; private static final BooleanStatus useEncoder = mainTuning . getBoolean ( "clamp-use-encoder" , false ) ; public static FloatInputPoll heightReadout ; public static void setup ( ) { FloatInputPoll encoder = Igneous . makeEncoder ( 10 , 11 , true ) ; ExtendedMotor clampCAN = Igneous . makeCANTalon ( 1 ) ; FloatOutput motorControlTemp = FloatMixing . ignoredFloatOutput ; try { <START_BUG> motorControlTemp = FloatMixing . negate ( clampCAN . asMode ( VOLTAGE_FRACTIONAL ) ) ; <END_BUG> if ( motorControlTemp == null ) { motorControlTemp = FloatMixing . ignoredFloatOutput ; } } catch ( ExtendedMotorFailureException e ) { Logger . severe ( "Exception<seq2seq4repair_space>thrown<seq2seq4repair_space>when<seq2seq4repair_space>creating<seq2seq4repair_space>clamp<seq2seq4repair_space>motor" , e ) ; } final FloatOutput speedControl = FloatMixing . addRamping ( 0.2F , constantPeriodic , FloatMixing . negate ( motorControlTemp ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Enable" , clampCAN . asEnable ( ) ) ; Ticker updateCAN = new Ticker ( 100 ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Bus<seq2seq4repair_space>Voltage" , FloatMixing . createDispatch ( clampCAN . asStatus ( BUS_VOLTAGE ) , updateCAN ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Output<seq2seq4repair_space>Current" , FloatMixing . createDispatch ( clampCAN . asStatus ( OUTPUT_CURRENT ) , updateCAN ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Output<seq2seq4repair_space>Voltage" , FloatMixing . createDispatch ( clampCAN . asStatus ( OUTPUT_VOLTAGE ) , updateCAN ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Temperature" , FloatMixing . createDispatch ( clampCAN . asStatus ( TEMPERATURE ) , updateCAN ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Any<seq2seq4repair_space>Fault" , BooleanMixing . createDispatch ( clampCAN . getDiagnosticChannel ( ANY_FAULT ) , updateCAN ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Bus<seq2seq4repair_space>Voltage<seq2seq4repair_space>Fault" , BooleanMixing . createDispatch ( clampCAN . getDiagnosticChannel ( BUS_VOLTAGE_FAULT ) , updateCAN ) ) ; Cluck . publish ( "CAN<seq2seq4repair_space>Clamp<seq2seq4repair_space>Temperature<seq2seq4repair_space>Fault" , BooleanMixing . createDispatch ( clampCAN . getDiagnosticChannel ( TEMPERATURE_FAULT ) , updateCAN ) ) ; BooleanInput limitTop = BooleanMixing . createDispatch ( BooleanMixing . invert ( Igneous . makeDigitalInput ( 2 ) ) , globalPeriodic ) ; BooleanInput limitBottom = BooleanMixing . createDispatch ( BooleanMixing . invert ( Igneous . makeDigitalInput ( 3 ) ) , globalPeriodic ) ; FloatStatus min = mainTuning . getFloat ( "clamp-min" , 0.0F ) ; FloatStatus max = mainTuning . getFloat ( "clamp-max" , 1.0F ) ; FloatMixing . pumpWhen ( EventMixing . filterEvent ( Clamp . useEncoder , true , BooleanMixing . onPress ( limitBottom ) ) , encoder , min ) ; FloatMixing . pumpWhen ( EventMixing . filterEvent ( Clamp . useEncoder , true , BooleanMixing . onPress ( limitTop ) ) , encoder , max ) ; FloatStatus p = mainTuning . getFloat ( "clamp-p" , 1.0F ) ; FloatStatus i = mainTuning . getFloat ( "clamp-i" , 0.0F ) ; FloatStatus d = mainTuning . getFloat ( "clamp-d" , 0.0F ) ; Clamp . heightReadout = FloatMixing . normalizeFloat ( encoder , min , max ) ; PIDControl pid = new PIDControl ( Clamp . heightReadout , Clamp . height , p , i , d ) ; pid . integralTotal . setWhen ( 0.0F , BooleanMixing . onRelease ( Clamp . mode ) ) ; FloatMixing . pumpWhen ( BooleanMixing . onRelease ( Clamp . mode ) , Clamp . heightReadout , Clamp . height ) ; globalControl . send ( pid ) ; FloatOutput out = ( value ) -> { if ( limitTop . get ( ) ) { value = Math . max ( value , 0 ) ; } if ( limitBottom . get ( ) ) { value = Math . min ( value , 0 ) ; } speedControl . set ( value ) ; } ; Clamp . mode . setTrueWhen ( EventMixing . filterEvent ( FloatMixing . floatIsOutsideRange ( Clamp . speed , ( - 0.3F ) , 0.3F ) , true , globalControl ) ) ; Clamp . mode . setTrueWhen ( startTele ) ; FloatMixing . pumpWhen ( globalControl , Mixing . select ( BooleanMixing . orBooleans ( Clamp . mode , Clamp . useEncoder . asInvertedInput ( ) ) , pid , Clamp . speed ) , FloatMixing . deadzone ( out , 0.1F ) ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Open<seq2seq4repair_space>Control" ) , Clamp . openControl ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Height<seq2seq4repair_space>Encoder" ) , FloatMixing . createDispatch ( encoder , globalPeriodic ) ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Height<seq2seq4repair_space>Scaled" ) , FloatMixing . createDispatch ( Clamp . heightReadout , globalPeriodic ) ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Height<seq2seq4repair_space>Setting" ) , Clamp . height ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Integral<seq2seq4repair_space>Total" ) , pid . integralTotal ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Limit<seq2seq4repair_space>Top" ) , limitTop ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Limit<seq2seq4repair_space>Bottom" ) , limitBottom ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>Motor<seq2seq4repair_space>Speed" ) , speedControl ) ; Cluck . publish ( ( ( QuasarHelios . testPrefix ) + "Clamp<seq2seq4repair_space>PID<seq2seq4repair_space>Output" ) , ( ( FloatInput ) ( pid ) ) ) ; Cluck . publish ( "Clamp<seq2seq4repair_space>Max<seq2seq4repair_space>Set" , FloatMixing . pumpEvent ( encoder , max ) ) ; Cluck . publish ( "Clamp<seq2seq4repair_space>Min<seq2seq4repair_space>Set" , FloatMixing . pumpEvent ( encoder , min ) ) ; } }

Fix:
motorControlTemp = clampCAN . asMode ( VOLTAGE_FRACTIONAL ) ;