Commit graph

76 commits

Author SHA1 Message Date
Gina Häußge
517fd6f3ab Auto detect Malyan firmware and configure comm layer
Should close #1762
2017-03-24 16:55:54 +01:00
Gina Häußge
136736d307 Reset line numbers if printer sends "start" when operational
Might have been an external reset of the printer we didn't otherwise
detect, and unless we reset the line numbers we'll now be off and run
into resend requests.

Solves #1676
2017-03-09 14:35:07 +01:00
Gina Häußge
20e1219d9e Virtual printer: configurable ok format 2017-03-01 15:48:36 +01:00
Gina Häußge
e1eaf4eb8e comm: More resilience against garbage on the line during connect
* leading and trailing null bytes will now be stripped
  * while connecting, a "wait" will also trigger switch to connected
    state - relevant when connecting without reset and initial "ok" for
    M110 gets mangled
  * extended virtual printer by new options to test the above:
      * mangled "ok" can now be injected via "preparedOks" setting and
        prepare_ok DEBUG command
      * simulated reset lines on beginning ("start" etc) now only sent
        if new setting "simulateReset" is true

Should fix #1770
2017-02-20 11:57:47 +01:00
Gina Häußge
216f05d553 Hibernate communication with printer during active G4 on Repetier
Should hopefully solve #1506
2017-02-17 13:52:16 +01:00
Gina Häußge
7ab3eabe0f Support for shared nozzle setups
Support multi-extruder setups that share a single nozzle and heater,
like the E3D Cyclops, Diamon hotend or probably the upcoming Prusa Mk2
multi-extruder upgrade.

The Control tab will still allow tool switching and extruding for
the configured extruders, the Temperature tab will only display
one hotend temperature though.

Printer profiles have been extended by a new option
extruder.sharedNozzle that defaults to False. Extruder offsets are
not displayed in the profile editor if that setting is checked and
reset to (0,0).
2017-01-26 13:33:42 +01:00
Gina Häußge
ec12e52865 virtual printer: small fix of temperature responses 2016-11-17 14:46:56 +01:00
Gina Häußge
b87348be3b Add support for M115 to virtual printer 2016-11-17 12:13:52 +01:00
Gina Häußge
2429ebc1a2 Virtual Printer: Simplified temperature output 2016-11-14 13:45:22 +01:00
Gina Häußge
c6b8b1725a Fixed duplicated M140 line (merge error) 2016-11-14 13:26:05 +01:00
Gina Häußge
4a67762ead virtual printer: Track F and flow/feedrate factors 2016-11-14 13:24:56 +01:00
Gina Häußge
c8273785cd Fix position tracking of virtual printer
Wasn't taking relative moves into account for coordinate persistence.
2016-11-11 11:52:33 +01:00
Gina Häußge
fae27c77b5 Have virtual printer coordinates start at 0.0 2016-11-04 12:12:30 +01:00
Gina Häußge
d3cc96523e Fix M114 in virtual printer 2016-10-21 20:37:41 +02:00
Gina Häußge
696979789e Merge branch 'improve/supportRinTempCommands' into devel
# Conflicts:
#	src/octoprint/plugins/virtual_printer/virtual.py
2016-10-17 10:44:18 +02:00
Gina Häußge
696904bc49 Support M1{09|90} R<temp> in virtual printer too 2016-10-17 10:41:39 +02:00
Gina Häußge
44402fda3a Use CleaningTimedRotatingFileHandler in virtual printer 2016-10-14 09:37:06 +02:00
Gina Häußge
3606ed126a Fix a merge error causing timeouts on the virtual printer
Long lines (longer than rx buffer) could not be processed at all, leading
to a serial timeout exception thrown by the virtual printer. Adjusted
to allow for partial processing like on maintenance
2016-10-13 17:43:03 +02:00
Gina Häußge
aae01fe81b Merge branch 'maintenance' into devel
Conflicts:
	CHANGELOG.md
	docs/api/fileops.rst
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/server/api/files.py
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/main.js
	src/octoprint/static/js/app/viewmodels/files.js
	src/octoprint/static/js/app/viewmodels/settings.js
	src/octoprint/templates/sidebar/state.jinja2
	src/octoprint/util/comm.py
2016-07-28 15:00:23 +02:00
Gina Häußge
4f1a55c2df Added AWOL debug command to virtual printer 2016-07-21 16:25:49 +02:00
Gina Häußge
2f26104b98 Better sleep debug command in virtual printer 2016-07-21 16:11:09 +02:00
Gina Häußge
c6225aa834 Introduce single output method in virtual printer for easier debugging 2016-07-21 13:25:39 +02:00
Gina Häußge
47b7acdfbc Merge branch 'dev/python3A' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3A
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/printer/standard.py
2016-07-15 12:28:19 +02:00
Gina Häußge
76a04cbe9d Merge branch 'dev/python3B' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3B 2016-07-15 11:28:55 +02:00
MirceaDan
c33a9f9aa2 from __future__ import absolute_import, division, print_function
changed the behavior to import division and print to be consistent
across all app and similar with python 3.x
2016-07-15 00:16:58 -07:00
MirceaDan
149cc8c7c5 python 3 changes exceptions, queue and asesrtEqual
1) import Queue is now lower caps

2) exceptions
except KeyError as e:

3) assertEquals is deprecated but assertEqual does exactly same thing
2016-07-14 23:53:39 -07:00
Gina Häußge
28814db207 Merge branch 'maintenance' into devel
Conflicts:
	setup.py
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/printer/standard.py
2016-07-14 19:47:38 +02:00
Gina Häußge
1e7ea28195 Merge branch 'fix/serialRxBufferHandling' into maintenance 2016-07-13 17:24:13 +02:00
Gina Häußge
937487037a Shorter timeout during heatup & no scary message on end
Set read timeout on serial port to a much shorter value (default 2.0s)
during a heatup. Firmware should usually send the current temperature
back every second, so if that stops we can consider the heatup to be finished
even if we don't see an ok.

That is important in cases such as SD printing, where we might see a
heatup sequence we didn't trigger ourselves, during which we shouldn't spam
the printer with commands it potentially can't process but after which we
still should take up normal communication again. In case of a heatup sequence
triggered by an SD print we won't see an ok and hence only can now through a
timeout that things are now done printer side. In such a case the user should not
get thrown a scary timeout message in their general direction either.

Solves #1409
2016-07-13 17:21:45 +02:00
Gina Häußge
99ec1efda7 Merge branch 'fix/serialRxBufferHandling' into devel
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
2016-07-12 17:54:07 +02:00
Gina Häußge
2b9aef5874 Keep sending if serial line was only sent partially
So far the sending routine did not track the amount of bytes that were
actually sent. This is now fixed such that if the number of sent bytes
is less then the number of bytes of the whole message, the sending
rountine will continue to send the unsent parts of the message until
it succeeds (or a timeout occurs).

Also adjusted the virtual printer to imitate a real serial interface with
regards to having it return the written bytes and allowing a partial
sending (returning the number of bytes that actually were sent).
2016-07-12 17:48:47 +02:00
Gina Häußge
a33338684e Merge branch 'fix/slicingDocs' into devel 2016-07-12 11:52:59 +02:00
Gina Häußge
58ee5f17f7 Fix simulation of moves on virtual printer 2016-07-08 16:44:40 +02:00
Gina Häußge
a2cd46899c Merge branch 'improve/intermediaryUrlsAndTimeouts' into devel
Conflicts:
	AUTHORS.md
	src/octoprint/plugins/virtual_printer/virtual.py
2016-07-06 13:32:03 +02:00
Mark Walker
3069e05766 Add RepRapPro style file opened to virtual printer
(cherry-picked from 257c4ed)
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
2016-07-06 05:14:10 +00:00
Gina Häußge
b32c231c47 Merge branch 'maintenance' into devel
Conflicts:
	CHANGELOG.md
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/static/js/app/viewmodels/gcode.js
2016-06-21 16:10:02 +02:00
Gina Häußge
0274b0f25b Have virtual printer report back with "B:" in line
Similar to Marlin with enabled COREXY. Useful for testing
parser behaviour.
2016-06-15 16:22:37 +02:00
Gina Häußge
54fe75fb4e Merge branch 'improve/aboutDialog' into devel
Conflicts:
	.gitignore
	THIRDPARTYLICENSES.md
	setup.py
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/server/__init__.py
	src/octoprint/server/util/flask.py
	src/octoprint/server/views.py
	src/octoprint/settings.py
	src/octoprint/templates/dialogs/about/about.jinja2
	src/octoprint/templates/index.jinja2
2016-04-21 12:10:03 +02:00
Gina Häußge
b54e1b44a4 Added checksum checking to virtual printer 2016-03-18 15:00:03 +01:00
Gina Häußge
7bdc4418fd Merge branch 'maintenance' into devel
Conflicts:
	CHANGELOG.md
	docs/configuration/config_yaml.rst
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/server/__init__.py
	src/octoprint/settings.py
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/viewmodels/settings.js
	src/octoprint/templates/dialogs/settings/serialconnection.jinja2
	src/octoprint/util/comm.py
2016-03-16 11:24:52 +01:00
Gina Häußge
c9009496f6 Don't trigger an M105 on timeout during a resend
Had to reorder message processing a bit in order to be able to
properly handle further resends in timeout situations.

Has the added benefit that "ok" now gets processed very early
and now extra state based processing is needed anymore.
2016-03-10 19:05:16 +01:00
Gina Häußge
069bfdd9f8 New flag to have M29 response inject "ok"
Adjusted virtual printer to allow marking of M29 as broken re sending
of ok.

Fixes #1273
2016-03-10 15:58:59 +01:00
Gina Häußge
27d1a6ca37 Virtual printer: request correct line in dummy resend 2016-03-09 15:33:17 +01:00
Gina Häußge
07d8d4b88d Made virtual printer a bit faster 2016-03-09 12:09:44 +01:00
Gina Häußge
5c06bd5036 Kill background tasks of virtual printer on disconnect
Otherwise there might be errors with wait-for-heatup or sd printing
situations where self.outgoing is gone suddenly.
2016-02-16 15:09:22 +01:00
Gina Häußge
b51274c145 Merge branch 'fix/m28hiccup' into devel 2016-02-09 11:33:20 +01:00
Gina Häußge
8069d08d3b Do not hiccup on manually sent M28 commands
In case of trying to switch to state printing with no selected file that
scenario is now caught by setting an internal manualStreaming flag.
That will stop the M105 polling until M29 is sent (through whatever
means).

Note that printing is not disabled... this is merely for testing stuff and
not encouraged to be used for actually streaming files to the printer,
use the built-in functionality for that!
2016-02-09 11:32:56 +01:00
Gina Häußge
adb77654f6 Merge branch 'fix/optionToIgnoreFirmwareErrors' into devel
Conflicts:
	src/octoprint/server/api/settings.py
	src/octoprint/settings.py
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/viewmodels/settings.js
	src/octoprint/templates/dialogs/settings/serialconnection.jinja2
2016-02-01 18:07:13 +01:00
Gina Häußge
0e817d43cc Added option to ignore any errors reported by the firmware
Use this carefully. An error reported by your firmware usually hints
at something being off about your printer (e.g. thermistor troubles)
or the firmware not being fully compatible to OctoPrint since
it doesn't recognize a lot of commands.

If you print with this option enabled, it will still fail if you firmware goes
into lockdown, but now it will keep trying to send data to your printer.

That might cause issues. So best not use that option, only if you absolutely
have no other way to get some misbehaving printer to work with
OctoPrint.
2016-02-01 16:55:13 +01:00
Gina Häußge
e64a9bd4b5 Added feature flag to toggle F command support
Defaults to off, set feature.supportFAsCommand to true to enable.
2015-12-17 10:37:32 +01:00