Ejemplo n.º 1
0
  public String getMachineInfo() {
    Driver driver = Base.getMachineLoader().getDriver();

    String info = new String();

    info += "System Information" + "\n";
    info += " ReplicatorG version: " + Base.VERSION_NAME + "\n";
    info += " Java version: " + System.getProperty("java.version") + "\n";

    info += "\n";
    info += "Machine" + "\n";
    info += " Profile Name: " + Base.preferences.get("machine.name", "") + "\n";
    info += " Driver Type: " + Base.getMachineLoader().getDriver().getDriverName() + "\n";
    info += " Name: " + Base.getMachineLoader().getMachine().getMachineName() + "\n";

    // TODO: Only if a printer is connected?
    info += " Motherboard firmware version: " + driver.getFirmwareInfo() + "\n";
    // Status dump

    // Communication Statistics
    if (driver instanceof OnboardParameters) {
      CommunicationStatistics stats = ((OnboardParameters) driver).getCommunicationStatistics();
      info += " Motherboard communication statistics" + "\n";
      info += "  Number of packets received from the USB interface:" + stats.packetCount + "\n";
      info += "  Number of packets sent over the RS485 interface:" + stats.sentPacketCount + "\n";
      info +=
          "  Number of packets sent over the RS485 interface that were not responded to:"
              + stats.packetFailureCount
              + "\n";
      info += "  Number of packet retries attempted:" + stats.packetRetryCount + "\n";
      info +=
          "  Number of bytes received over the RS485 interface that were discarded as noise:"
              + stats.noiseByteCount
              + "\n";
    }
    // EEPROM dump

    // Toolhead info (per toolhead)

    // Default skeinforge version/profile info?

    // Machine Driver XML dump
    info += "\n";
    info += "Machine Driver XML:" + "\n";
    Node machineNode = MachineFactory.getMachineNode(Base.preferences.get("machine.name", ""));
    if (machineNode != null) {
      info += convertNodeToHtml(machineNode) + "\n";
    }

    // Test communication

    return info;
  }
Ejemplo n.º 2
0
  private StatusPanelWindow(MachineController m) {
    super("Status Panel");

    // save our machine!
    machine = m;
    driver = machine.getDriver();
    driver.invalidatePosition(); // Always force a query when we open the panel

    // Listen to it-- stop and close if we're in build mode.
    machine.addMachineStateListener(this);

    // default behavior
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);

    // create all our GUI interfaces
    add(createToolsPanel());

    // add our listener hooks.
    addWindowListener(this);

    setResizable(false);

    // start our thread.
    updateThread = new UpdateThread(this);
    updateThread.start();
  }
Ejemplo n.º 3
0
 @Override
 public void run(Driver driver) throws RetryException, StopException {
   driver.disableAxes(axes);
 }