mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 02:31:10 -06:00
avrdude: Use a minimalistic embedded conf instead of an external file
This commit is contained in:
parent
fba4d109c8
commit
ffd7a3d933
12 changed files with 1717 additions and 14993 deletions
|
|
@ -42,7 +42,6 @@ static void avrdude_oom_handler(const char *context, void *user_p)
|
|||
|
||||
struct AvrDude::priv
|
||||
{
|
||||
std::string sys_config;
|
||||
std::deque<std::vector<std::string>> args;
|
||||
bool cancelled = false;
|
||||
int exit_code = 0;
|
||||
|
|
@ -54,8 +53,6 @@ struct AvrDude::priv
|
|||
|
||||
std::thread avrdude_thread;
|
||||
|
||||
priv(std::string &&sys_config) : sys_config(sys_config) {}
|
||||
|
||||
void set_handlers();
|
||||
void unset_handlers();
|
||||
int run_one(const std::vector<std::string> &args);
|
||||
|
|
@ -110,7 +107,7 @@ int AvrDude::priv::run_one(const std::vector<std::string> &args) {
|
|||
|
||||
message_fn(command_line.c_str(), command_line.size());
|
||||
|
||||
const auto res = ::avrdude_main(static_cast<int>(c_args.size()), c_args.data(), sys_config.c_str());
|
||||
const auto res = ::avrdude_main(static_cast<int>(c_args.size()), c_args.data());
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
@ -130,7 +127,7 @@ int AvrDude::priv::run() {
|
|||
|
||||
// Public
|
||||
|
||||
AvrDude::AvrDude(std::string sys_config) : p(new priv(std::move(sys_config))) {}
|
||||
AvrDude::AvrDude() : p(new priv()) {}
|
||||
|
||||
AvrDude::AvrDude(AvrDude &&other) : p(std::move(other.p)) {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue