NEW:compatible with p1p (plus)

jira:[p1p]

Change-Id: I7b30903dc0a728604c4f33c325aa79fd3bd08f68
This commit is contained in:
tao wang 2023-12-07 15:53:19 +08:00 committed by Lane.Wei
parent 955d62fdf1
commit b6e0049bea
3 changed files with 16 additions and 0 deletions

View File

@ -1376,6 +1376,10 @@ void MachineObject::parse_status(int flag)
if(!is_support_motor_noise_cali){
is_support_motor_noise_cali = ((flag >> 21) & 0x1) != 0;
}
if (!is_support_p1s_plus) {
is_support_p1s_plus = ((flag >> 27) & 0x1) != 0;
}
sdcard_state = MachineObject::SdcardState((flag >> 8) & 0x11);

View File

@ -739,6 +739,7 @@ public:
bool is_support_motor_noise_cali{false};
bool is_support_wait_sending_finish{false};
bool is_support_user_preset{false};
bool is_support_p1s_plus{false};
int nozzle_max_temperature = -1;
int bed_temperature_limit = -1;

View File

@ -2346,11 +2346,22 @@ bool SelectMachineDialog::is_same_printer_model()
PresetBundle* preset_bundle = wxGetApp().preset_bundle;
if (preset_bundle && preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle) != obj_->printer_type) {
if (obj_->is_support_p1s_plus && (preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle) == "C12")) {
return true;
}
BOOST_LOG_TRIVIAL(info) << "printer_model: source = " << preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
BOOST_LOG_TRIVIAL(info) << "printer_model: target = " << obj_->printer_type;
return false;
}
if (obj_->is_support_p1s_plus) {
BOOST_LOG_TRIVIAL(info) << "printer_model: source = " << preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
BOOST_LOG_TRIVIAL(info) << "printer_model: target = " << obj_->printer_type << " (plus)";
return false;
}
return true;
}