protected synchronized void profileTimeout(){
  if (state == ProfileState.WAIT_FOR_THROTTLE) {
    tidyUp();
    log.error("Timeout waiting for throttle");
    statusLabel.setText("Timeout waiting for throttle");
  }
 else   if (state == ProfileState.RUNNING) {
    if (profileDir == ProfileDirection.FORWARD) {
      spFwd.setPoint(profileStep,avSpeed);
      statusLabel.setText((rb.getString("Fwd") + " step: " + profileStep));
    }
 else {
      spRev.setPoint(profileStep,avSpeed);
      statusLabel.setText((rb.getString("Rev") + " step: " + profileStep));
    }
    profileGraphPane.repaint();
    if (profileStep == 29) {
      if ((profileDir == ProfileDirection.FORWARD) && dirRevButton.isSelected()) {
        profileDir=ProfileDirection.REVERSE;
        throttle.setIsForward(false);
        profileStep=0;
        avClr();
        statusLabel.setText(rb.getString("StatCreateRev"));
      }
 else {
        tidyUp();
        statusLabel.setText(rb.getString("StatDone"));
      }
    }
 else {
      if (profileStep == 28) {
        profileSpeed=0.0F;
      }
 else {
        profileSpeed+=profileIncrement;
      }
      throttle.setSpeedSetting(profileSpeed);
      profileStep+=1;
      profileTimer.setDelay(7000 - range * 1000);
    }
  }
 else {
    log.error("Unexpected profile timeout");
    profileTimer.stop();
  }
}

protected synchronized void profileTimeout ( ) { if ( state == ProfileState . WAIT_FOR_THROTTLE ) { tidyUp ( ) ; log . error ( "Timeout waiting for throttle" ) ; statusLabel . setText ( "Timeout waiting for throttle" ) ; } else if ( state == ProfileState . RUNNING ) { if ( profileDir == ProfileDirection . FORWARD ) { spFwd . setPoint ( profileStep , avSpeed ) ; statusLabel . setText ( ( rb . getString ( "Fwd" ) + " step: " + profileStep ) ) ; } else { spRev . setPoint ( profileStep , avSpeed ) ; statusLabel . setText ( ( rb . getString ( "Rev" ) + " step: " + profileStep ) ) ; } profileGraphPane . repaint ( ) ; if ( profileStep == 29 ) { if ( ( profileDir == ProfileDirection . FORWARD ) && dirRevButton . isSelected ( ) ) { profileDir = ProfileDirection . REVERSE ; throttle . setIsForward ( false ) ; profileStep = 0 ; avClr ( ) ; statusLabel . setText ( rb . getString ( "StatCreateRev" ) ) ; } else { tidyUp ( ) ; statusLabel . setText ( rb . getString ( "StatDone" ) ) ; } } else { if ( profileStep == 28 ) { profileSpeed = 0.0F ; } else { profileSpeed += profileIncrement ; } throttle . setSpeedSetting ( profileSpeed ) ; profileStep += 1 ; profileTimer . setDelay ( 7000 - range * 1000 ) ; } } else { log . error ( "Unexpected profile timeout" ) ; profileTimer . stop ( ) ; } }
time to change to next speed increment
