You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository was created to maintain the the Qidi official patches to moonraker in a more traditional git fork.
Currently, they're in a repository which does not share common git history with Moonraker. That makes it harder to update their patched version with new changes to moonraker from upstream.
The main branch on this repository is qidi-master, which contains the patched version. This is kept distinct from the upstream copy on master.
Ideally, this repository would not be required at all. Some changes that would be great to see:
Official QIDITECH/moonraker repository updated to be a more traditional fork of Arksine/moonraker (similar to this repo)
Patches reworked to minimize their surface area within the official moonraker codebase, making it easier to keep the fork up-to-date
Software interacting with these patches updated to either not rely upon moonraker, or patches reworked to be more appropriate for upstream contribution to moonraker (followed by updates to software that interacts with it)
In particular, I think with more information on the software that utilizes these changes, these patches could all be reworked such that they have no dependence on moonraker at all. Either through a mini API that proxies most requests through, but intercepts and modifies requests that need additional changes, or by implementing these changes in the calling software instead.
QIDI Patches
This is just a summary of the patches so far. There are a few which are difficult to split out from moonraker without knowing why they need to exist, and there are a few which seem like they can just be removed. But for now, this repository will contain all of them.
If we can get more information, or just do more testing, we can probably work around or otherwise remove all of these changes from moonraker to allow for use of the upstream moonraker going forward.
machine_name Added to sysinfo request
Request /machine/system_info was modified from GET to POST, and when a machine_name is provided in the request it will be written to /dev_info.txt on the filesystem.
Problem: When GET and not POST is called first, self.system_info["machine_name"] will be set to None. Ideally, this patch would simply read the file if it exists and set that value, otherwise not set it. That would also be safer, as I don't see a reason why you should be able to modify files in / by simply posting to the API. In addition, there is a race condition here where until this is called for the first time, the other API calls which return self.system_info do not return the machine_name. If the calling software does not depend on values outside of this call, then there's no issue, but in that case modifying that dict isn't necessary anyway.
.jpg Thumbnail support
There's logic added to support .jpg thumbnails from the file manager APIs. This takes existing .png thumbnail files, converts them to .jpg and saves them in multiple sizes to the filesystem.
Smallest thumbnail by default
Alongside the .jpg changes, these patches also change the priority for thumbnail responses to return the smallest file rather than the largest file by default.
QIDI Slicer Identity
An alias has been added for PrusaSlicer, identifying QIDISlicer as a version of PrusaSlicer.
parse_gimage, parse_simage
Two functions have been added for returning metadata for gimage and simage from the slicer output. Frankly, I don't know what this is, please let me know below if you happen to know / work it out.
GCode Cache
A set of "cache" are maintained when you call start_print. These don't appear to be doing much actual caching, as they aren't read here, and they are simply exact copies of already existing gcode files. I presume that these are used to keep some other software happy? Moonraker already does caching around gcode and metadata, so presumably if other software isn't using the cache copies, this patch can be removed.
DEFAULT_ALLOWED_SERVICES
A list of default allowed services is written to the file moonraker.asvc if that file doesn't already exist. I don't really get the point here, the config already allows setting this, and the filesystem is managed by QIDI. So theoretically, there's no need for this patch?
The text was updated successfully, but these errors were encountered:
Explanation
This repository was created to maintain the the Qidi official patches to moonraker in a more traditional git fork.
Currently, they're in a repository which does not share common git history with Moonraker. That makes it harder to update their patched version with new changes to moonraker from upstream.
The main branch on this repository is
qidi-master
, which contains the patched version. This is kept distinct from the upstream copy onmaster
.The patches this repository contains come from here: QIDITECH/moonraker#1 (comment)
Ideal state
Ideally, this repository would not be required at all. Some changes that would be great to see:
In particular, I think with more information on the software that utilizes these changes, these patches could all be reworked such that they have no dependence on moonraker at all. Either through a mini API that proxies most requests through, but intercepts and modifies requests that need additional changes, or by implementing these changes in the calling software instead.
QIDI Patches
This is just a summary of the patches so far. There are a few which are difficult to split out from moonraker without knowing why they need to exist, and there are a few which seem like they can just be removed. But for now, this repository will contain all of them.
If we can get more information, or just do more testing, we can probably work around or otherwise remove all of these changes from moonraker to allow for use of the upstream moonraker going forward.
machine_name
Added to sysinfo requestRequest
/machine/system_info
was modified from GET to POST, and when a machine_name is provided in the request it will be written to/dev_info.txt
on the filesystem.Problem: When GET and not POST is called first,
self.system_info["machine_name"]
will be set toNone
. Ideally, this patch would simply read the file if it exists and set that value, otherwise not set it. That would also be safer, as I don't see a reason why you should be able to modify files in/
by simply posting to the API. In addition, there is a race condition here where until this is called for the first time, the other API calls which returnself.system_info
do not return themachine_name
. If the calling software does not depend on values outside of this call, then there's no issue, but in that case modifying that dict isn't necessary anyway..jpg
Thumbnail supportThere's logic added to support
.jpg
thumbnails from the file manager APIs. This takes existing.png
thumbnail files, converts them to.jpg
and saves them in multiple sizes to the filesystem.Smallest thumbnail by default
Alongside the
.jpg
changes, these patches also change the priority for thumbnail responses to return the smallest file rather than the largest file by default.QIDI Slicer Identity
An alias has been added for PrusaSlicer, identifying QIDISlicer as a version of PrusaSlicer.
parse_gimage, parse_simage
Two functions have been added for returning metadata for
gimage
andsimage
from the slicer output. Frankly, I don't know what this is, please let me know below if you happen to know / work it out.GCode Cache
A set of "cache" are maintained when you call
start_print
. These don't appear to be doing much actual caching, as they aren't read here, and they are simply exact copies of already existing gcode files. I presume that these are used to keep some other software happy? Moonraker already does caching around gcode and metadata, so presumably if other software isn't using the cache copies, this patch can be removed.DEFAULT_ALLOWED_SERVICES
A list of default allowed services is written to the file
moonraker.asvc
if that file doesn't already exist. I don't really get the point here, the config already allows setting this, and the filesystem is managed by QIDI. So theoretically, there's no need for this patch?The text was updated successfully, but these errors were encountered: