Falashforge 5M network support (#4546)

* build action changes

* Adding flashforge 5M series network support

* Update CMakeLists.txt

* Update Flashforge.cpp

* reverting files for pull request

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
iherbak 2024-03-22 12:22:46 +01:00 committed by GitHub
parent 2bda9db207
commit f1c91dc551
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 256 additions and 16 deletions

View file

@ -25,6 +25,8 @@
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/MsgDialog.hpp"
#include "Http.hpp"
#include "SerialMessage.hpp"
#include "SerialMessageType.hpp"
namespace fs = boost::filesystem;
namespace pt = boost::property_tree;
@ -40,8 +42,8 @@ const char* MKS::get_name() const { return "MKS"; }
bool MKS::test(wxString& msg) const
{
Utils::TCPConsole console(m_host, m_console_port);
console.enqueue_cmd("M105");
Slic3r::Utils::SerialMessage s("M105", Slic3r::Utils::Command);
console.enqueue_cmd(s);
bool ret = console.run_queue();
if (!ret)
@ -126,9 +128,10 @@ bool MKS::start_print(wxString& msg, const std::string& filename) const
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
Utils::TCPConsole console(m_host, m_console_port);
console.enqueue_cmd(std::string("M23 ") + filename);
console.enqueue_cmd("M24");
Slic3r::Utils::SerialMessage s(std::string("M23 ") + filename, Slic3r::Utils::Command);
console.enqueue_cmd(s);
s.message = "M24";
console.enqueue_cmd(s);
bool ret = console.run_queue();