mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	some code formatting
This commit is contained in:
		
							parent
							
								
									dd1fd66a47
								
							
						
					
					
						commit
						d4b73701d9
					
				
					 3 changed files with 11 additions and 12 deletions
				
			
		| 
						 | 
					@ -168,7 +168,7 @@ sub thread_cleanup {
 | 
				
			||||||
    *Slic3r::GUI::TabIface::DESTROY         = sub {};
 | 
					    *Slic3r::GUI::TabIface::DESTROY         = sub {};
 | 
				
			||||||
    *Slic3r::OctoPrint::DESTROY             = sub {};
 | 
					    *Slic3r::OctoPrint::DESTROY             = sub {};
 | 
				
			||||||
    *Slic3r::Duet::DESTROY                  = sub {};
 | 
					    *Slic3r::Duet::DESTROY                  = sub {};
 | 
				
			||||||
    *Slic3r::PrintHostFactory::DESTROY                  = sub {};
 | 
					    *Slic3r::PrintHostFactory::DESTROY      = sub {};
 | 
				
			||||||
    *Slic3r::PresetUpdater::DESTROY         = sub {};
 | 
					    *Slic3r::PresetUpdater::DESTROY         = sub {};
 | 
				
			||||||
    return undef;  # this prevents a "Scalars leaked" warning
 | 
					    return undef;  # this prevents a "Scalars leaked" warning
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -255,10 +255,10 @@ add_library(libslic3r_gui STATIC
 | 
				
			||||||
    ${LIBDIR}/slic3r/Utils/PrintHostSendDialog.hpp
 | 
					    ${LIBDIR}/slic3r/Utils/PrintHostSendDialog.hpp
 | 
				
			||||||
    ${LIBDIR}/slic3r/Utils/OctoPrint.cpp
 | 
					    ${LIBDIR}/slic3r/Utils/OctoPrint.cpp
 | 
				
			||||||
    ${LIBDIR}/slic3r/Utils/OctoPrint.hpp
 | 
					    ${LIBDIR}/slic3r/Utils/OctoPrint.hpp
 | 
				
			||||||
	${LIBDIR}/slic3r/Utils/Duet.cpp
 | 
					    ${LIBDIR}/slic3r/Utils/Duet.cpp
 | 
				
			||||||
	${LIBDIR}/slic3r/Utils/Duet.hpp
 | 
					    ${LIBDIR}/slic3r/Utils/Duet.hpp
 | 
				
			||||||
	${LIBDIR}/slic3r/Utils/PrintHostFactory.cpp
 | 
					    ${LIBDIR}/slic3r/Utils/PrintHostFactory.cpp
 | 
				
			||||||
	${LIBDIR}/slic3r/Utils/PrintHostFactory.hpp
 | 
					    ${LIBDIR}/slic3r/Utils/PrintHostFactory.hpp
 | 
				
			||||||
    ${LIBDIR}/slic3r/Utils/Bonjour.cpp
 | 
					    ${LIBDIR}/slic3r/Utils/Bonjour.cpp
 | 
				
			||||||
    ${LIBDIR}/slic3r/Utils/Bonjour.hpp
 | 
					    ${LIBDIR}/slic3r/Utils/Bonjour.hpp
 | 
				
			||||||
    ${LIBDIR}/slic3r/Utils/PresetUpdater.cpp
 | 
					    ${LIBDIR}/slic3r/Utils/PresetUpdater.cpp
 | 
				
			||||||
| 
						 | 
					@ -417,8 +417,8 @@ set(XS_XSP_FILES
 | 
				
			||||||
    ${XSP_DIR}/Surface.xsp
 | 
					    ${XSP_DIR}/Surface.xsp
 | 
				
			||||||
    ${XSP_DIR}/SurfaceCollection.xsp
 | 
					    ${XSP_DIR}/SurfaceCollection.xsp
 | 
				
			||||||
    ${XSP_DIR}/TriangleMesh.xsp
 | 
					    ${XSP_DIR}/TriangleMesh.xsp
 | 
				
			||||||
	${XSP_DIR}/Utils_PrintHostFactory.xsp
 | 
					    ${XSP_DIR}/Utils_PrintHostFactory.xsp
 | 
				
			||||||
	${XSP_DIR}/Utils_PrintHost.xsp
 | 
					    ${XSP_DIR}/Utils_PrintHost.xsp
 | 
				
			||||||
    ${XSP_DIR}/Utils_PresetUpdater.xsp
 | 
					    ${XSP_DIR}/Utils_PresetUpdater.xsp
 | 
				
			||||||
    ${XSP_DIR}/AppController.xsp
 | 
					    ${XSP_DIR}/AppController.xsp
 | 
				
			||||||
    ${XSP_DIR}/XS.xsp
 | 
					    ${XSP_DIR}/XS.xsp
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,7 +82,6 @@ bool Duet::send_gcode(const std::string &filename) const
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bool res = true;
 | 
						bool res = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
	auto upload_cmd = get_upload_url(upload_filepath.string());
 | 
						auto upload_cmd = get_upload_url(upload_filepath.string());
 | 
				
			||||||
	BOOST_LOG_TRIVIAL(info) << boost::format("Duet: Uploading file %1%, filename: %2%, path: %3%, print: %4%, command: %5%")
 | 
						BOOST_LOG_TRIVIAL(info) << boost::format("Duet: Uploading file %1%, filename: %2%, path: %3%, print: %4%, command: %5%")
 | 
				
			||||||
		% filepath.string()
 | 
							% filepath.string()
 | 
				
			||||||
| 
						 | 
					@ -196,7 +195,6 @@ void Duet::disconnect() const
 | 
				
			||||||
		BOOST_LOG_TRIVIAL(error) << boost::format("Duet: Error disconnecting: %1%, HTTP %2%, body: `%3%`") % error % status % body;
 | 
							BOOST_LOG_TRIVIAL(error) << boost::format("Duet: Error disconnecting: %1%, HTTP %2%, body: `%3%`") % error % status % body;
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	.perform_sync();
 | 
						.perform_sync();
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
std::string Duet::get_upload_url(const std::string &filename) const
 | 
					std::string Duet::get_upload_url(const std::string &filename) const
 | 
				
			||||||
| 
						 | 
					@ -231,8 +229,8 @@ std::string Duet::get_base_url() const
 | 
				
			||||||
std::string Duet::timestamp_str() const
 | 
					std::string Duet::timestamp_str() const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	auto t = std::time(nullptr);
 | 
						auto t = std::time(nullptr);
 | 
				
			||||||
    auto tm = *std::localtime(&t);
 | 
						auto tm = *std::localtime(&t);
 | 
				
			||||||
    std::stringstream ss;
 | 
						std::stringstream ss;
 | 
				
			||||||
	ss << "time=" << std::put_time(&tm, "%Y-%d-%mT%H:%M:%S");
 | 
						ss << "time=" << std::put_time(&tm, "%Y-%d-%mT%H:%M:%S");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return ss.str();
 | 
						return ss.str();
 | 
				
			||||||
| 
						 | 
					@ -248,7 +246,8 @@ wxString Duet::format_error(const std::string &body, const std::string &error, u
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool Duet::start_print(wxString &msg, const std::string &filename) const {
 | 
					bool Duet::start_print(wxString &msg, const std::string &filename) const 
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
	bool res = false;
 | 
						bool res = false;
 | 
				
			||||||
	auto url = (boost::format("%1%rr_gcode?gcode=M32%%20\"%2%\"")
 | 
						auto url = (boost::format("%1%rr_gcode?gcode=M32%%20\"%2%\"")
 | 
				
			||||||
			% get_base_url()
 | 
								% get_base_url()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue