From: <adr...@us...> - 2010-10-15 22:25:23
|
Revision: 3836 http://reprap.svn.sourceforge.net/reprap/?rev=3836&view=rev Author: adrian-bowyer Date: 2010-10-15 22:25:17 +0000 (Fri, 15 Oct 2010) Log Message: ----------- Host software updated to report Jonathan's firmware configuration string when Debug is switched on. Modified Paths: -------------- trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java trunk/software/host/src/org/reprap/machines/GCodeRepRap.java Modified: trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java =================================================================== --- trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java 2010-10-14 08:41:04 UTC (rev 3835) +++ trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java 2010-10-15 22:25:17 UTC (rev 3836) @@ -39,6 +39,7 @@ private double bTemp; private double x, y, z, e; private RrGraphics simulationPlot = null; + private String lastResp; /** * Stop sending a file (if we are). */ @@ -195,6 +196,7 @@ // responseAvailable = false; // response = "0000"; opFileIndex = -1; + lastResp = ""; try { portName = Preferences.loadGlobalString("Port(name)"); @@ -676,6 +678,11 @@ } return e; } + + public String lastResponse() + { + return lastResp; + } /** @@ -748,6 +755,7 @@ if(!goAgain) { Debug.c("Response: " + resp); + lastResp = resp.substring(2); return result; } } else Modified: trunk/software/host/src/org/reprap/machines/GCodeRepRap.java =================================================================== --- trunk/software/host/src/org/reprap/machines/GCodeRepRap.java 2010-10-14 08:41:04 UTC (rev 3835) +++ trunk/software/host/src/org/reprap/machines/GCodeRepRap.java 2010-10-15 22:25:17 UTC (rev 3836) @@ -43,6 +43,8 @@ gcode = new GCodeReaderAndWriter(); gcode.queue("M110 ; Reset the line numbers"); + gcode.queue("M115 ; Get the firmware version numbers etc"); + Debug.d("Firmware configuration string: " + gcode.lastResponse()); loadExtruders(); forceSelection = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |