package com.edinarobotics.utils.gamepad;

/**
 * This is a convenience class that makes it easier to implement a toggle
 * button.
 */
public class ToggleHelper {
    private boolean toggleReady;
    
    /**
     * Constructs a new ToggleHelper.
     */
    public ToggleHelper(){
        toggleReady = false;
    }
    
    /**
     * Checks if the boolean value is toggled with respect to previous values.
     * @param latestState the current boolean value.
     * @return {@code true} if the value is toggled, {@code false} otherwise.
     */
    public boolean isToggled(boolean latestState){
        if(latestState == false){
            toggleReady = true;
        }
        else if(latestState == true && toggleReady){
            toggleReady = false;
            return true;
        }
        else{
            toggleReady = false;
        }
        return false;
    }
}

@@ -599,24 +599,25 @@
 %0A        if(
+!
 latestState 
@@ -619,17 +619,8 @@
 tate
- == false
 )%7B%0A 
@@ -692,16 +692,8 @@
 ate 
-== true 
 && t

Fix boolean testing in ToggleHelper.