mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-29 19:53:44 -06:00
FirmwareDialog: Fix progress display
This commit is contained in:
parent
2a07f3a0d5
commit
5414f7379d
4 changed files with 43 additions and 13 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue