Commit Graph

13 Commits (81bc0de492b56c858e3c5f37d38fd3ef59d8c6dd)

Author SHA1 Message Date
Guillaume Seguin 81bc0de492 Fix minor bug in gcoder which broke hilighting in gviz
When getting rid of the gcode line number (N**), we were not switching command
string to uppercase.
2013-05-19 13:33:19 +02:00
Guillaume Seguin 5b572c167f Compute duration estimation across all actual layers for correctness
This also matters as those actual layers are what we will use for ETA
2013-05-18 23:09:49 +02:00
Guillaume Seguin 7c3250a9e1 Add lineno => (layer, layer_line) mapping to gcoder 2013-05-18 23:07:53 +02:00
Guillaume Seguin 8013ac86be Implement coordinate tracking for manual moves (#343)
This change needs testing : M114 is unbuffered, and thus might break lookahead
for Marlin and results in laggy jogging. We need to see how bad this is and
find some smart way to do it (like to send the M114 only when the user stopped
clicking everywhere, by using some timer callbacks).
2013-05-18 22:39:35 +02:00
Guillaume Seguin f1fc71ba05 Store all layers, including ones with no movement
This is a first step towards using gcoder.GCode as a storage for print-time
gcode. Now all we need is a "gcode line id => (layer id, in-layer line id)"
mapping to be able to do the indirection.
2013-05-18 22:23:28 +02:00
Guillaume Seguin b781566132 Remove newline matching from regexp 2013-05-18 22:09:56 +02:00
Guillaume Seguin bd09e6f444 Cleanup gcoder.py a little bit 2013-05-18 21:47:27 +02:00
Guillaume Seguin 6826dad61d Use a regular expression to parse GCodes
This should parse parentheses correctly and handle (valid) gcodes such as
G1X2Y3, while before we were assuming spaces between tokens (which is wrong as
per the G-Code spec). This should fix req #333 in a clean and systematic way.
This is also a component for #343 (Marlin M114 response is in the form ok C:
X11Y22Z33E44, which we can parse with the same expression).
2013-05-18 21:16:09 +02:00
Guillaume Seguin 06e3a02d4f Fix used filament estimation
Compute the max of all total lengths
2013-05-18 20:20:53 +02:00
Guillaume Seguin c6104d56ef Remove "pessimistic" from estimated duration string
The computed duration is no more pessimistic, for a few reasons.
- the main one is that it does not take retraction into account
- Z moves are not taken into account either
- arcs are not supported
- the acceleration code seems to estimate acceleration time correctly but is
  wrong for deceleration
So instead of telling the user this estimation is pessimistic, let's just tell
them this is an estimate.
2013-05-18 19:52:05 +02:00
Guillaume Seguin df00b7e2a1 Don't parse gcodes other than G* (attempt to harden against #303) 2013-05-16 20:32:50 +02:00
Guillaume Seguin 975b45936d Handle N... gcodes in GCoder 2013-05-16 19:16:13 +02:00
Guillaume Seguin a80a2fea4b Move gcoder.py into printrun module 2013-05-16 15:05:28 +02:00