mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: update the calibration dialog
jira: [STUDIO-9769] [STUDIO-9547] Change-Id: I29149a978b86c27b244690083e0c3bb96566e60b (cherry picked from commit 329807156a1d5aa60069beb3ae62527e8295bfc7)
This commit is contained in:
@@ -2382,7 +2382,7 @@ bool MachineObject::is_support_command_calibration()
|
||||
return true;
|
||||
}
|
||||
|
||||
int MachineObject::command_start_calibration(bool vibration, bool bed_leveling, bool xcam_cali, bool motor_noise)
|
||||
int MachineObject::command_start_calibration(bool vibration, bool bed_leveling, bool xcam_cali, bool motor_noise, bool nozzle_cali, bool bed_cali)
|
||||
{
|
||||
if (!is_support_command_calibration()) {
|
||||
// fixed gcode file
|
||||
@@ -2395,7 +2395,9 @@ int MachineObject::command_start_calibration(bool vibration, bool bed_leveling,
|
||||
json j;
|
||||
j["print"]["command"] = "calibration";
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["print"]["option"]= (motor_noise ? 1 << 3 : 0)
|
||||
j["print"]["option"]= (bed_cali ? 1 << 5 : 0)
|
||||
+ (nozzle_cali ? 1 << 4 : 0)
|
||||
+ (motor_noise ? 1 << 3 : 0)
|
||||
+ (vibration ? 1 << 2 : 0)
|
||||
+ (bed_leveling ? 1 << 1 : 0)
|
||||
+ (xcam_cali ? 1 << 0 : 0);
|
||||
@@ -3287,6 +3289,16 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
}
|
||||
}
|
||||
|
||||
if (jj.contains("support_nozzle_offset_calibration") && jj["support_nozzle_offset_calibration"].is_boolean())
|
||||
{
|
||||
is_support_nozzle_offset_cali = jj["support_nozzle_offset_calibration"].get<bool>();
|
||||
}
|
||||
|
||||
if (jj.contains("support_high_tempbed_calibration") && jj["support_high_tempbed_calibration"].is_boolean())
|
||||
{
|
||||
is_support_high_tempbed_cali = jj["support_high_tempbed_calibration"].get<bool>();
|
||||
}
|
||||
|
||||
if (jj.contains("support_build_plate_marker_detect")) {
|
||||
if (jj["support_build_plate_marker_detect"].is_boolean()) {
|
||||
is_support_build_plate_marker_detect = jj["support_build_plate_marker_detect"].get<bool>();
|
||||
|
||||
Reference in New Issue
Block a user