f98ebaaf moved the passive_logon code to a new function from
api/__init__.py to util/flask.py. Before that move any fallthrough
would hit return NO_CONTENT, but now it returns nothing which makes
flask complain.
This hook allows the plugin to create the serial port object (or pass to
the next hook or the builtin serial port handler) which allows for
serial communication filtering or a different communication transport.
Use @foosel's code to use the same loop for hooks as well as the
builtin.
Also, modify the cura slicer to recognize the setting and avoid
adjusting the model position, just leave it in the center where it would
be on a circular platform
Having to wait for the first serial timeout before sending the first M105 even when not waiting for seeing a "start" caused unnecessary wait times for reaching the "Operational" state.
Add computed property "name" to function objects if not provided by the
browser, to avoid dropping out of main.js before it is finished.
(cherry picked from commit 68215c6)
Tracking the "ok" attached to a resend is necessary in order to make sure that it does not trigger the resend of the next line after the requested one right after, causing resend loops in some cases, e.g. "> 100", "> 101" , "< rs 100", "ok", "> 100", "< expected 100, got 101, rs 100" -- here the last error from the firmware could not be processed as "false negative" correctly (101 was already sent to the printer when it detected the error for 100, so this error just needs to be ignored) since the resend flag was already cleared due to line 100 and 101 having been enqueued, 100 in the resend handler, 101 due to the following ok. This patch fixes the latter, thus solving the problem.
Plugins may be enabled and disabled during runtime. If they are of types which allow hot loading, this will be done. Otherwise they will be marked as pending and updated after a restart. Same for installation and uninstallation.
Plugins may be loaded, unloaded, activated and deactivated. Errors while trying to load a plugin or initializing an implementation will only result in it staying deactive but registered in the system, allowing it to be further processed e.g. by a plugin manager
Can be used to always retrieve the defaults (by providing an empty config dict) or to utilize the get method with other settings than the system settings.
Multiple mixins are allowed of course. Allowing multiple implementations lead to too many problems due to plugin names for referring to the APIs of SimpleApiPlugins or the assets of AssetPlugins.
Hence __plugin_implementations__ has been deprecated in favor of __plugin_implementation__. The plugin subsystem will automatically copy the first implementation from __plugin_implementations__ to __plugin_implementation__ and log a deprecation warning.
Adjusted documentation accordingly. Also added docs for helpers.
Detected plugins are now logged in a better readable way and with additional information.
Also marked folder for bundled plugins as bundled - forgot to do that earlier.
This way user adjustments to those timeouts via the settings
will take immediate effect even while the connection to the
printer is already established.
For as long as his name is still passed along the Clacks,
Death can't have him.
-- "Going Postal", Chapter 4 Prologue
RIP Terry Pratchett
See also http://gnuterrypratchett.com/
Added a lot of documentation, more stream lining, should now work completely without having to define types but offer the same/more functionality than before. Backwards compatible too.
Preprocessing for better performancy, unit tests for preprocessing, controls don't need a type anymore (makes things way less complicated and repetitive)
Adding a line such as
OCTOPRINT_ADDITIONAL_BINDINGS.push(["gcodeFilesViewModel", "#tab_plugin_my_other_file_plugin"]);
to a plugin JS now allows the plugin to configure existing view models to bind to additional elements, not just the ones configured by the view model itself. This allows binding view models of standard components to other component types and thus "moving" components, e.g. the files dialog from the sidebar to the tab section.
config.yaml now has a new section "components" located under "appearance" which allows configuring the order and list of disabled components. Example:
appearance:
components:
order:
tab:
- control
- temperature
- gcodeviewer
- terminal
- timelapse
disabled:
sidebar:
- files
This would make the "Control" tab the first tab, followed by the usual order (plugins afterwards), and disable the Files sidebar component.
Refactored some things in octoprint.util.comm and octoprint.settings, added migration function to get users of the devel version up to date with their gcode scripts. Migration function will be removed again one week from now.
Utilizes a "TypedQueue" which tracks command types - if provided - and doesn't
add entries of the same type as another entry in the queue.
Somewhat backported from dev/commRefactoring branch
For some versions, the ok for a file delete message is not prepended
by a newline: "File Deleted:<filename>ok"
This work around will make it still detectable.
Sometimes M26 S0 does not cause a selected SD file to be
properly rewound, leading to issues when restarting the
print job. Reselecting the file (and ignoring the
resulting select event) solves this.
- renamed methods from camelCase to snake_case
- renamed callback mathods from comm module from camelCase to snake_case
- extracted and documented public interface to be used by plugins
- extracted callback interface to be implemented by subscribed callbacks to printer
- moved standard implementation to custom package
- moved time estimation classes to custom package
Should solve issues where the "Disconnected" dialog briefly appears when the connection gets interrupted only briefly, e.g. when starting a timelapse download in Firefox.
This should fix the problem where on a fresh setup it was impossible to upload slicing profiles for Cura before
the path to the binary was configured.
Also made the slicing dialog auto update available slicers when the settings are updated. The slicing button
in the file list is now only active if a slicer is available. The slicing dialog will only show upon upload of
an STL file if a slicer is available.
Closes#795
OctoPrint got confused by prepended / in files on printer's SD cards
located within folders.
New handling makes comm always use absolute path names for SD card
file names (even those in the root), printer converts between
this representation and the storage interface compatible version
of file and folder names being stated relative to the root (so
no leading /)
Added wrappers to ensure existing plugins being able to work, although them using the old camel case method names now causes a deprecation warning being logged