Skip to content

Commit

Permalink
1. change sswcp name 'Connect' & 'Disconnect' 2.fix issue when connec…
Browse files Browse the repository at this point in the history
…ting with wifi button
  • Loading branch information
womendoushihaoyin committed Jan 15, 2025
1 parent 4c4d51e commit a0d5ec7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3395,6 +3395,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Snapmaker Orca can upload G-code files to a printer host. This field must contain "
"the kind of the host.");
def->enum_keys_map = &ConfigOptionEnum<PrintHostType>::get_enum_values();
def->enum_values.push_back("moonraker_mqtt");
def->enum_values.push_back("moonraker");
def->enum_values.push_back("prusalink");
def->enum_values.push_back("prusaconnect");
Expand All @@ -3409,6 +3410,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("obico");
def->enum_values.push_back("flashforge");
def->enum_values.push_back("simplyprint");
def->enum_labels.push_back("MoonRaker On MQTT");
def->enum_labels.push_back("MoonRaker");
def->enum_labels.push_back("PrusaLink");
def->enum_labels.push_back("PrusaConnect");
Expand All @@ -3425,7 +3427,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("SimplyPrint");
def->mode = comAdvanced;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionEnum<PrintHostType>(htMoonRaker_mqtt));
def->set_default_value(new ConfigOptionEnum<PrintHostType>(htMoonRaker));


def = this->add("nozzle_volume", coFloat);
Expand Down
8 changes: 4 additions & 4 deletions src/slic3r/GUI/SSWCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,9 @@ void SSWCP_MachineOption_Instance::sw_GetMachineObjects()
void SSWCP_MachineConnect_Instance::process() {
if (m_cmd == "sw_Test_connect") {
sw_test_connect();
} else if (m_cmd == "sw_SelectMachine") {
} else if (m_cmd == "sw_Connect") {
sw_connect();
} else if (m_cmd == "sw_DisConnect") {
} else if (m_cmd == "sw_Disconnect") {
sw_disconnect();
}
}
Expand Down Expand Up @@ -822,8 +822,8 @@ std::unordered_set<std::string> SSWCP::m_machine_option_cmd_list = {

std::unordered_set<std::string> SSWCP::m_machine_connect_cmd_list = {
"sw_Test_connect",
"sw_SelectMachine",
"sw_DisConnect",
"sw_Connect",
"sw_Disconnect",
};

std::shared_ptr<SSWCP_Instance> SSWCP::create_sswcp_instance(std::string cmd, const json& header, const json& data, std::string event_id, wxWebView* webview)
Expand Down

0 comments on commit a0d5ec7

Please sign in to comment.