Code:
boolean buttonPressedForwardSpike = false; // these are in init.
boolean buttonPressedForwardVictor = false; // init
// !!The below statement doesn't evaluate to a boolean
if (xbox.getRawAxis(5)) { // 5 being the Y axis on right stick
spike1.set(Relay.Value.kForward);
spike2.set(Relay.Value.kForward);
buttonPressedForwardSpike = true;
// !!!!!!!!!!! The below staetment assigns instead of comparing
} else if (buttonPressedForwardSpike = true) {
spike1.set(Relay.Value.kOff);
spike2.set(Relay.Value.kOff);
buttonPressedForwardSpike = false;
}
If that's the exact one, then yeah, it SHOULD be fine. Though I'd still recommend checking it, for sanity reasons.