Commit Graph

10 Commits

Author SHA1 Message Date
Markus Hitter 7441f6b6ba Simulator: be more clear about files opened.
Before, a seemingly valid command like ...

  ./sim -o sim-log.log -t 0 testcases/triangle-odd.gcode

... would not act as expected (treat both files as G-code source)
and not give meaningful hints on what's going on either. It just
reported 'Could not stat file'. No hint that it tries to open the
intended log file as G-code source.

Now the message reporting opening of a G-code file names it as
'G-code source' and opening of the recorder file gets reported,
too. Which should give a good idea about what's going on.
2018-01-07 12:54:26 +01:00
Phil Hord 573dbfe576 Simulator: record serial data as comments, not as G-code.
We cheated before and sent the serial data in the simulator into
the G-code reporter so it could be line-buffered and then recorded
as comments in the trace-log. But this confuses the simulator
console output and is harder to manage. Revert to sending serial-out
data directly to the comment engine.

Also be less chatty about startup when connecting to a UART.
2015-07-17 16:34:20 +02:00
Phil Hord 76bf5ef75a Datalog: show traced data as signed ints, not unsigned. 2014-08-31 19:09:37 +02:00
Phil Hord 5cd6cf50d8 Zungmann's fixes to compile simulator on Mac OS X, part 1.
Compiling for Mac OS X needs some customizations noticed by zungmann
in the reprap forum:

http://forums.reprap.org/read.php?147,33082,279050#msg-279050
2014-03-04 19:57:41 +01:00
Phil Hord 96495fb9bb simulator: Make time-scale=0 a cmdline option
Teach the simulator to run with no delays when time-scale=0.

Let the user specify the time-scale on the command line.
2013-12-06 19:24:58 +01:00
Phil Hord c7b43782ce datalog: add a tip showing gnuplot usage
Add a comment to the datalog output showing how it can be viewed with
gnuplot.  It would be trivial to add this as a .plot script, but it's
even easier in the datalog output.
2013-12-06 19:24:58 +01:00
Phil Hord 8874397b45 Make data logging optional (internal)
If the recorder is initialized with a filename, write trace data
to that file.  But if it is not initialized, don't complain and
don't write the data anywhere.
2013-12-06 19:24:58 +01:00
Phil Hord cf015623e3 simulator: Add position to datalog.out
Cleanup datalog output a bit.
  * Add close/flush on exit in case we have pending data
  * Use hash for comment characters to be compatible with gnuplot
  * Report x/y/z/e position in array
2013-12-06 19:24:58 +01:00
Phil Hord 2b8a5d3b5a simulator: record g-codes in datalog
Add comment stream to datalog output so we can store g-codes and
other events that occur during simulation.
2013-12-06 19:24:58 +01:00
Phil Hord 1e2824d56b WIP: Add simulator data-logging.
Record simulation run-time data in file 'datalog.out' so it
can be analyzed after-the-fact or during the run.

This feature is evolving. Eventually it should be compatible with
some logic analyzer GUIs such as gtkwave or even gnuplot.
2013-12-06 19:24:58 +01:00