//sets emergency break on and sends signal to train model private void emergencyON() { if (failureStatus != 0 || currSpeedms > 0) { emergencyButton.Checked = true; TM.setEmergency(true); power = 0; } else { emergencyOFF(); emergencyOverride = false; } }