Support upload g-code to third-party printers

* wip

* fix cmake warning

* add UI and config options for Moonraker connection

* wip: copy whole print host UI from PS

* add more needed options

* wip 2

* fix string issue on Mac

* wip3

* fix cmake warning

* working
need tweaks

* cleanup

* support thumbnail

* fix DNS resolving issue in Windows

* code clean up
This commit is contained in:
SoftFever 2022-08-20 23:06:41 +08:00 committed by GitHub
parent 82127a92c9
commit 488b1cd8f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 5000 additions and 17 deletions

View file

@ -14,7 +14,7 @@
#include "libslic3r.h"
#include "LocalesUtils.hpp"
#include "libslic3r/format.hpp"
#include "Time.hpp"
#include <algorithm>
#include <cstdlib>
#include <chrono>
@ -1352,9 +1352,11 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
//BBS: add plate id into thumbnail render logic
//DoExport::export_thumbnails_to_file(thumbnail_cb, print.get_plate_index(), THUMBNAIL_SIZE,
// [&file](const char* sz) { file.write(sz); },
// [&print]() { print.throw_if_canceled(); });
file.write_format("; hack-fix: write fake slicer info here so that Moonraker will extract thumbs.\n");
file.write_format("; %s\n\n",std::string(std::string("generated by PrusaSlicer " SLIC3R_VERSION " on " ) + Slic3r::Utils::utc_timestamp()).c_str());
DoExport::export_thumbnails_to_file(thumbnail_cb, print.get_plate_index(), { Vec2d(300, 300) },
[&file](const char* sz) { file.write(sz); },
[&print]() { print.throw_if_canceled(); });
// Write some terse information on the slicing parameters.