mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
Rework G10 temperature support to be enabled only for a new Firmware type RepRapFirmware
leaving the RepRap/Sprinter
behaviour alone. Rename the enum for gcfRepRap
to gcfRepRapSprinter
and add new gcfRepRapFirmware
enum value. Also adds code to only use the G10 searching in custom G-code if the flavour is RepRapFirmware.
This commit is contained in:
parent
e275197518
commit
f6d25d0634
7 changed files with 32 additions and 19 deletions
|
@ -46,7 +46,13 @@ std::string GCodeWriter::preamble()
|
|||
gcode << "G21 ; set units to millimeters\n";
|
||||
gcode << "G90 ; use absolute coordinates\n";
|
||||
}
|
||||
if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfMarlin) || FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepetier) || FLAVOR_IS(gcfSmoothie)) {
|
||||
if (FLAVOR_IS(gcfRepRapSprinter) ||
|
||||
FLAVOR_IS(gcfRepRapFirmware) ||
|
||||
FLAVOR_IS(gcfMarlin) ||
|
||||
FLAVOR_IS(gcfTeacup) ||
|
||||
FLAVOR_IS(gcfRepetier) ||
|
||||
FLAVOR_IS(gcfSmoothie))
|
||||
{
|
||||
if (this->config.use_relative_e_distances) {
|
||||
gcode << "M83 ; use relative distances for extrusion\n";
|
||||
} else {
|
||||
|
@ -72,11 +78,11 @@ std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, in
|
|||
return "";
|
||||
|
||||
std::string code, comment;
|
||||
if (wait && FLAVOR_IS_NOT(gcfTeacup) && FLAVOR_IS_NOT(gcfRepRap)) {
|
||||
if (wait && FLAVOR_IS_NOT(gcfTeacup) && FLAVOR_IS_NOT(gcfRepRapFirmware)) {
|
||||
code = "M109";
|
||||
comment = "set temperature and wait for it to be reached";
|
||||
} else {
|
||||
if (FLAVOR_IS(gcfRepRap)) { // M104 is deprecated on RepRapFirmware
|
||||
if (FLAVOR_IS(gcfRepRapFirmware)) { // M104 is deprecated on RepRapFirmware
|
||||
code = "G10";
|
||||
} else {
|
||||
code = "M104";
|
||||
|
@ -94,7 +100,7 @@ std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, in
|
|||
gcode << temperature;
|
||||
bool multiple_tools = this->multiple_extruders && ! m_single_extruder_multi_material;
|
||||
if (tool != -1 && (multiple_tools || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) ) {
|
||||
if (FLAVOR_IS(gcfRepRap)) {
|
||||
if (FLAVOR_IS(gcfRepRapFirmware)) {
|
||||
gcode << " P" << tool;
|
||||
} else {
|
||||
gcode << " T" << tool;
|
||||
|
@ -102,7 +108,7 @@ std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, in
|
|||
}
|
||||
gcode << " ; " << comment << "\n";
|
||||
|
||||
if ((FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepRap)) && wait)
|
||||
if ((FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepRapFirmware)) && wait)
|
||||
gcode << "M116 ; wait for temperature to be reached\n";
|
||||
|
||||
return gcode.str();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue