diff --git a/src/avrdude/ac_cfg.h b/src/avrdude/ac_cfg.h index 2461bf307..41d648bf1 100644 --- a/src/avrdude/ac_cfg.h +++ b/src/avrdude/ac_cfg.h @@ -169,22 +169,22 @@ #define LT_OBJDIR ".libs/" /* Name of package */ -#define PACKAGE "avrdude" +#define PACKAGE "avrdude-slic3r" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "avrdude-dev@nongnu.org" +#define PACKAGE_BUGREPORT "https://github.com/prusa3d/Slic3r/issues" /* Define to the full name of this package. */ -#define PACKAGE_NAME "avrdude" +#define PACKAGE_NAME "avrdude-slic3r" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "avrdude 6.3-20160220" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "avrdude" +#define PACKAGE_TARNAME "avrdude-slic3r" /* Define to the home page for this package. */ -#define PACKAGE_URL "" +#define PACKAGE_URL "https://github.com/prusa3d/Slic3r" /* Define to the version of this package. */ #define PACKAGE_VERSION "6.3-20160220" diff --git a/src/avrdude/avrdude-slic3r.cpp b/src/avrdude/avrdude-slic3r.cpp index 3037f5284..debf204a8 100644 --- a/src/avrdude/avrdude-slic3r.cpp +++ b/src/avrdude/avrdude-slic3r.cpp @@ -96,13 +96,20 @@ void AvrDude::priv::unset_handlers() int AvrDude::priv::run_one(const std::vector &args) { - std::vector c_args {{ const_cast(PACKAGE_NAME) }}; + std::vector c_args {{ const_cast(PACKAGE) }}; + std::string command_line { PACKAGE }; + for (const auto &arg : args) { c_args.push_back(const_cast(arg.data())); + command_line.push_back(' '); + command_line.append(arg); } + command_line.push_back('\n'); HandlerGuard guard(*this); + message_fn(command_line.c_str(), command_line.size()); + const auto res = ::avrdude_main(static_cast(c_args.size()), c_args.data(), sys_config.c_str()); return res; diff --git a/src/avrdude/main.c b/src/avrdude/main.c index 9ada27be3..80a9b3737 100644 --- a/src/avrdude/main.c +++ b/src/avrdude/main.c @@ -1082,6 +1082,7 @@ int avrdude_main(int argc, char * argv [], const char *sys_config) if (rc < 0) { exitrc = 1; pgm->ppidata = 0; /* clear all bits at exit */ + avrdude_message(MSG_INFO, "%s: Could not open port: %s\n", progname, port); goto main_exit; } is_open = 1; diff --git a/src/slic3r/GUI/FirmwareDialog.cpp b/src/slic3r/GUI/FirmwareDialog.cpp index 90e2cbc9c..4ca2eb90c 100644 --- a/src/slic3r/GUI/FirmwareDialog.cpp +++ b/src/slic3r/GUI/FirmwareDialog.cpp @@ -446,7 +446,7 @@ void FirmwareDialog::priv::prepare_common() "-U", (boost::format("flash:w:0:%1%:i") % hex_file.path.string()).str(), }}; - BOOST_LOG_TRIVIAL(info) << "Invoking avrdude, arguments: " + BOOST_LOG_TRIVIAL(info) << "Preparing arguments avrdude: " << std::accumulate(std::next(args.begin()), args.end(), args[0], [](std::string a, const std::string &b) { return a + ' ' + b; }); @@ -492,7 +492,7 @@ void FirmwareDialog::priv::prepare_mk3() "-U", (boost::format("flash:w:1:%1%:i") % hex_file.path.string()).str(), }}; - BOOST_LOG_TRIVIAL(info) << "Invoking avrdude for external flash flashing, arguments: " + BOOST_LOG_TRIVIAL(info) << "Preparing avrdude arguments for external flash flashing: " << std::accumulate(std::next(args.begin()), args.end(), args[0], [](std::string a, const std::string &b) { return a + ' ' + b; }); @@ -522,7 +522,7 @@ void FirmwareDialog::priv::prepare_mm_control() "-U", (boost::format("flash:w:0:%1%:i") % hex_file.path.string()).str(), }}; - BOOST_LOG_TRIVIAL(info) << "Invoking avrdude, arguments: " + BOOST_LOG_TRIVIAL(info) << "Preparing avrdude arguments: " << std::accumulate(std::next(args.begin()), args.end(), args[0], [](std::string a, const std::string &b) { return a + ' ' + b; });