Example #1
0
  /**
   * Records bots movements to specified file
   *
   * @param sFileName
   */
  public void record(String sFileName) {
    if (!m_bRecStarted) {
      m_sFile = sFileName;
      m_tmRecorder.start();
      m_bRecStarted = true;
    }

    if (!m_bRecDone) {
      m_Index++;
      m_botDataAuto = new BotData();
      m_botDataAuto.setValues(m_tmRecorder.get(), m_bot);
      m_List.addElement(m_botDataAuto);
    } else {
      Vars.fnDisableDrive();
      m_bot.stopRobot();
      m_tmRecorder.stop();
      m_tmRecorder.reset();
    }
  }
Example #2
0
 /**
  * Gets the time value of the recording, as in how long it has been replaying
  *
  * @return
  */
 public double getRecordTime() {
   return Vars.fnSetPrecision(m_tmRecorder.get());
 }