Commit Graph

1079 Commits (master)

Author SHA1 Message Date
Sergiusz B fdb8b0bebe Fix compatibility issues on Gentoo. 2013-05-30 16:32:09 +02:00
Kliment Yanev 54fd879825 Gcode was not analyzed when loading through pronterface load file button 2013-05-20 11:43:06 +02:00
Guillaume Seguin 69793bd295 Merge branch 'experimental' of github.com:kliment/Printrun into experimental 2013-05-19 13:34:59 +02:00
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
Kliment Yanev 98bdb2b108 Enable manual commands of any format to be passed through if prefixed by @ 2013-05-19 13:32:58 +02:00
Guillaume Seguin 3b8352acdf Cleanup a little bit gviz 2013-05-19 13:20:01 +02:00
Guillaume Seguin 75afa014e3 Use a deque instead of a list to store hilighted lines
This might speed up Pronterface while printing.
Indeed, as we keep adding items we keep expanding the list and Python has to
move it all the time.
2013-05-19 13:13:03 +02:00
Guillaume Seguin c5de6439e0 More translation strings for pronsole.py 2013-05-19 12:58:57 +02:00
Guillaume Seguin 9f9b8d05cd Cleanup pronsole.py loading & some SD stuff 2013-05-19 12:38:40 +02:00
Guillaume Seguin 1dfb0cd6fe Cleanup pronsole._do_load and parse gcode from there 2013-05-19 00:17:10 +02:00
Guillaume Seguin 16208aec18 Use a fixed-size deque for storing the log
deque is much better fitted than a simple Python list
Indeed, a standard Python list is stored as an array, and has to be reallocated
all the time, while a deque has very fast operation on both ends, and the fixed
size mode will automatically drop first element when pushing to a full deque.
Also it was crazy to store the whole log. Storing 10000 log lines seems decent
and shouldn't take way too much space (less than 512KB based on a quick
estimation).
This might fix #292 and #353.
2013-05-18 23:46:00 +02:00
Guillaume Seguin 3fe969e536 Cosmetic change to a translated string
This change is free as I already changed this string before pushing :)
2013-05-18 23:29:37 +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 be10cff3c5 Cleanup and fix recvcb 2013-05-18 23:01:13 +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 d94ba0de62 Remove useless temp display update, since we already do it in recvcb 2013-05-18 22:38:32 +02:00
Guillaume Seguin 008d3f4a4e Minor cleanup 2013-05-18 22:37:49 +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 1fec635721 Merge branch 'experimental' of github.com:kliment/Printrun into experimental 2013-05-18 19:14:21 +02:00
Guillaume Seguin d8277e61a0 Cleanup 2013-05-18 18:40:30 +02:00
Guillaume Seguin da0cab63c7 Don't limit sentlines queue size 2013-05-18 18:38:54 +02:00
Guillaume Seguin 6164e162b5 Remove old comment 2013-05-18 18:36:11 +02:00
Guillaume Seguin eee65d71dd Cleanup 2013-05-18 18:33:13 +02:00
Guillaume Seguin aadd62ef09 Fix error in gcode arc parsing 2013-05-18 18:30:54 +02:00
Guillaume Seguin a4759865ba Import shlex from the beginning 2013-05-18 17:18:20 +02:00
Guillaume Seguin 97f7635fbd Reduce delay a little bit. 2013-05-18 17:16:01 +02:00
Guillaume Seguin 13592b865f Delay zooming on resize a little bit in gviz to prevent hogging CPU. 2013-05-18 17:15:19 +02:00
Guillaume Seguin 82b95c67cc More cleanup on gviz.
I'm hunting unjustified try: except: blocks.
2013-05-18 17:06:04 +02:00
Guillaume Seguin a53c88a325 Remove dead code 2013-05-18 17:02:55 +02:00
Guillaume Seguin 856b46ccef Clean up gviz a little more and ensure we have room to display border 2013-05-18 17:01:55 +02:00
Guillaume Seguin a6cab813c1 Add icon for gviz window "reset view"
The icon was adapted from the 24x24 "Refresh" icon from Humanity Icon theme.
2013-05-18 16:47:38 +02:00
Guillaume Seguin dc2a425068 Fix reparenting error 2013-05-18 15:16:36 +02:00
Guillaume Seguin e6fe35519d Cleanup (replace a for loop & list copy by a simple pop) 2013-05-18 14:18:20 +02:00
Guillaume Seguin faeb14f190 Explicitely delete wx.App at the end of pronterface.py
Okai, this may not make that much sense. However when removing the mainloop,
pronterface was segfaulting when Python was freeing everything. As a
workaround, explictely destroy the wx application, which will cleanly free
things in order, while Python might destroy wx things in a random order.
2013-05-18 12:50:18 +02:00
Guillaume Seguin e29dd70efe Merge branch 'experimental' into HEAD
Conflicts:
	printrun/gviz.py
2013-05-18 11:14:50 +02:00
Guillaume Seguin 68c13162e1 Fix #363 by correctly doing the wxFrame/wxPanel parenting
As far as I understand, a wxFrame needs a wxPanel child, but we shouldn't
reparent this wxPanel to some other container. As a consequence, I created an
initial wxPanel for the gwindow wxFrame and assigned it the previous sizer
(instead of using the gviz panel as the wxFrame's panel).
Not sure why it wasn't segfaulting on my other systems, though.
2013-05-18 11:09:22 +02:00
Guillaume Seguin 16b5f6db25 Cleanup some code
Not sure about that dropping of the self.gwindow.Destroy try block, we'll see
2013-05-18 11:05:45 +02:00
Guillaume Seguin 7657b37539 Expand gauges as much as possible 2013-05-17 17:53:05 +02:00
Guillaume Seguin dfa474e0b1 Correctly draw right edge shadow for temp gauges 2013-05-17 17:52:33 +02:00
Guillaume Seguin 7fc0f1c475 Add -g/--gauges CLI argument for temp gauges, and improved argparsing.
The gauges options is a CLI parameter as having it as an option would be
too painful to handle for now.
Argument parsing has been improved so that pronterface can add its own CLI
parameters in addition to pronsole's ones.
2013-05-17 17:04:41 +02:00
Guillaume Seguin 90e32562ea More work on getting the gauges back 2013-05-17 16:59:28 +02:00
Guillaume Seguin 89453befd1 Fix possible issue where checksum would break layer change detection
Should fix #348
2013-05-17 16:48:53 +02:00
Guillaume Seguin a9c3e8b442 Revert "Remove temperature gauges entirely from codebase"
This reverts commit 02ef52d777.
First step towards getting the gauges optionally back for #296.
2013-05-17 16:33:05 +02:00
Guillaume Seguin 94d69f793c Set transparent brush for painting temp graph's background
This should fix the weird graph background for #359
2013-05-17 16:21:21 +02:00