Пример #1
0
 public static void print(String s) {
   String hashMarkSpacer = "";
   for (int i = 0; i < s.length(); i++) {
     hashMarkSpacer = hashMarkSpacer + "#";
   }
   DebugOutput.out("", 0);
   DebugOutput.out(hashMarkSpacer, 0);
   DebugOutput.out(s, 0);
   DebugOutput.out(hashMarkSpacer, 0);
   DebugOutput.out("", 0);
 }
Пример #2
0
 public static void main(String[] args) throws InterruptedException, IOException {
   if (DebugOutput.init()) {
     if (Config.load()) {
       if (!Config.firstRun) {
         print("Beginning Lib parsing...");
         if (ParseLib.parseTheLib()) {
           print("Lib parsing complete. Beginning Java parsing...");
           if (FileCreator.createDir(FileCreator.recipeDir)) {
             if (ParseJava.parseTheJava()) {
               print("Java parsing complete.  Beginning Javascript output...");
               JavascriptOutput.outputJavascript();
               print("Congratz, all done!");
               DebugOutput.log.close();
               Thread.sleep(15000);
             } else {
               DebugOutput.log.close();
               Thread.sleep(15000);
             }
           } else {
             DebugOutput.log.close();
             Thread.sleep(15000);
           }
         } else {
           DebugOutput.log.close();
           Thread.sleep(15000);
         }
       } else {
         DebugOutput.out(
             "\n\n"
                 + "#########################################################################\n"
                 + "Program stopping due to this being the first run.\n"
                 + "Please check that the config options are to your liking before rerunning.\n"
                 + "Config location: "
                 + Config.configFile.getAbsolutePath()
                 + "\n"
                 + "#########################################################################",
             0);
         DebugOutput.log.close();
         Thread.sleep(15000);
       }
     } else {
       DebugOutput.log.close();
       Thread.sleep(15000);
     }
   } else {
     DebugOutput.log.close();
     Thread.sleep(15000);
   }
 }
Пример #3
0
 /**
  * Set flag indicating if this motor is at the end of it's travel. Typically called after making a
  * motion of "step" motor steps. A positive value of "step" indicates are at the positive EOT. A
  * negative value of "step" indicates are at the negative EOT. A zero value for "step" indicates
  * are not at EOT.
  *
  * @param step Flag that we are at EOT for steps in this direction.
  */
 public void setEot(int step) {
   m_eotStatus = step;
   if (step == 0) {
     m_eotCount = 0;
   } else if (DebugOutput.isSetFor("TuneAlgorithm")) {
     Messages.postDebug("Setting EOT=" + step + " on motor " + m_gmi);
   }
 }