public Boolean getHasCoral() {
return hasCoral;
}
@Override
public void periodic() {
if (coralSwitch.get()) {
hasCoral = true;
} else {
hasCoral = false;
}
}
hasCoral serves no real purpose here. It's just a proxy for reading the switch. getHasCoral (which could just be named hasCoral) should return the value of the switch directly