Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/avrdude/avrdude-slic3r.hpp')
-rw-r--r--xs/src/avrdude/avrdude-slic3r.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/xs/src/avrdude/avrdude-slic3r.hpp b/xs/src/avrdude/avrdude-slic3r.hpp
index 8d881b094..29d96f72d 100644
--- a/xs/src/avrdude/avrdude-slic3r.hpp
+++ b/xs/src/avrdude/avrdude-slic3r.hpp
@@ -12,6 +12,7 @@ class AvrDude
{
public:
typedef std::shared_ptr<AvrDude> Ptr;
+ typedef std::function<void()> RunFn;
typedef std::function<void(const char * /* msg */, unsigned /* size */)> MessageFn;
typedef std::function<void(const char * /* task */, unsigned /* progress */)> ProgressFn;
typedef std::function<void(int /* exit status */)> CompleteFn;
@@ -29,6 +30,11 @@ public:
// Set avrdude cli arguments
AvrDude& args(std::vector<std::string> args);
+ // Set a callback to be called just after run() before avrdude is ran
+ // This can be used to perform any needed setup tasks from the background thread.
+ // This has no effect when using run_sync().
+ AvrDude& on_run(RunFn fn);
+
// Set message output callback
AvrDude& on_message(MessageFn fn);