Document.

This commit is contained in:
Marek Bel 2019-09-17 18:58:59 +02:00
parent c66b4bd876
commit 966d9baf2b
2 changed files with 31 additions and 17 deletions

View File

@ -4663,11 +4663,25 @@ static void wizard_lay1cal_message(bool cold)
//! @startuml //! @startuml
//! [*] --> IsFil //! [*] --> IsFil
//! IsFil : Is any filament loaded? //! IsFil : Is any filament loaded?
//! load : Push the button to start loading Filament 1 //! LoadFilCold : Push the button to start loading Filament 1
//! //!
//! IsFil --> calibration : yes //! IsFil --> Lay1CalCold : yes
//! IsFil --> load : no //! IsFil --> LoadFilCold : no
//! load --> calibration : click //! LoadFilCold --> Lay1CalCold : click
//! @enduml
//!
//! First layer calibration without MMU state diagram
//!
//! @startuml
//! [*] --> IsFil
//! IsFil : Is filament loaded?
//! Preheat : Select nozle temperature which matches your material.
//! LoadFilHot : Insert filament to extruder and press the knob.
//!
//! IsFil --> Lay1CalCold : yes
//! IsFil --> Preheat : no
//! Preheat --> LoadFilHot : select
//! LoadFilHot --> Lay1CalHot : click
//! @enduml //! @enduml
//! //!
//! @param state Entry point of the wizard //! @param state Entry point of the wizard
@ -4676,7 +4690,7 @@ static void wizard_lay1cal_message(bool cold)
//! ---------------------- | ---------------- //! ---------------------- | ----------------
//! WizState::Run | Main entry point //! WizState::Run | Main entry point
//! WizState::RepeatLay1Cal | Entry point after passing 1st layer calibration //! WizState::RepeatLay1Cal | Entry point after passing 1st layer calibration
//! WizState::LoadFil | Entry point after temporarily left for preheat before load filament //! WizState::LoadFilHot | Entry point after temporarily left for preheat before load filament
void lcd_wizard(WizState state) void lcd_wizard(WizState state)
{ {
using S = WizState; using S = WizState;
@ -4713,7 +4727,7 @@ void lcd_wizard(WizState state)
end = true; end = true;
} }
break; break;
case S::Restore: // restore calibration status case S::Restore:
switch (calibration_status()) { switch (calibration_status()) {
case CALIBRATION_STATUS_ASSEMBLED: state = S::Selftest; break; //run selftest case CALIBRATION_STATUS_ASSEMBLED: state = S::Selftest; break; //run selftest
case CALIBRATION_STATUS_XYZ_CALIBRATION: state = S::Xyz; break; //run xyz cal. case CALIBRATION_STATUS_XYZ_CALIBRATION: state = S::Xyz; break; //run xyz cal.
@ -4732,13 +4746,13 @@ void lcd_wizard(WizState state)
} }
else end = true; else end = true;
break; break;
case S::Xyz: //xyz calibration case S::Xyz:
lcd_show_fullscreen_message_and_wait_P(_i("I will run xyz calibration now. It will take approx. 12 mins."));////MSG_WIZARD_XYZ_CAL c=20 r=8 lcd_show_fullscreen_message_and_wait_P(_i("I will run xyz calibration now. It will take approx. 12 mins."));////MSG_WIZARD_XYZ_CAL c=20 r=8
wizard_event = gcode_M45(false, 0); wizard_event = gcode_M45(false, 0);
if (wizard_event) state = S::IsFil; if (wizard_event) state = S::IsFil;
else end = true; else end = true;
break; break;
case S::Z: //z calibration case S::Z:
lcd_show_fullscreen_message_and_wait_P(_i("Please remove shipping helpers first.")); lcd_show_fullscreen_message_and_wait_P(_i("Please remove shipping helpers first."));
lcd_show_fullscreen_message_and_wait_P(_i("Now remove the test print from steel sheet.")); lcd_show_fullscreen_message_and_wait_P(_i("Now remove the test print from steel sheet."));
lcd_show_fullscreen_message_and_wait_P(_i("I will run z calibration now."));////MSG_WIZARD_Z_CAL c=20 r=8 lcd_show_fullscreen_message_and_wait_P(_i("I will run z calibration now."));////MSG_WIZARD_Z_CAL c=20 r=8
@ -4760,8 +4774,8 @@ void lcd_wizard(WizState state)
} }
else end = true; else end = true;
break; break;
case S::IsFil: //is filament loaded? case S::IsFil:
//start to preheat nozzle and bed to save some time later //start to preheat nozzle and bed to save some time later
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0); setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0);
setTargetBed(PLA_PREHEAT_HPB_TEMP); setTargetBed(PLA_PREHEAT_HPB_TEMP);
if (mmu_enabled) if (mmu_enabled)
@ -4783,12 +4797,12 @@ void lcd_wizard(WizState state)
lcd_show_fullscreen_message_and_wait_P(_i("Select nozzle preheat temperature which matches your material.")); lcd_show_fullscreen_message_and_wait_P(_i("Select nozzle preheat temperature which matches your material."));
end = true; // Leave wizard temporarily for lcd_preheat_menu end = true; // Leave wizard temporarily for lcd_preheat_menu
break; break;
case S::LoadFilHot: //load filament case S::LoadFilHot:
wait_preheat(); wait_preheat();
lcd_wizard_load(); lcd_wizard_load();
state = S::Lay1CalHot; state = S::Lay1CalHot;
break; break;
case S::LoadFilCold: //load filament case S::LoadFilCold:
lcd_wizard_load(); lcd_wizard_load();
state = S::Lay1CalCold; state = S::Lay1CalCold;
break; break;
@ -4802,7 +4816,7 @@ void lcd_wizard(WizState state)
lcd_commands_type = LcdCommands::Layer1Cal; lcd_commands_type = LcdCommands::Layer1Cal;
end = true; // Leave wizard temporarily for lcd_v2_calibration end = true; // Leave wizard temporarily for lcd_v2_calibration
break; break;
case S::RepeatLay1Cal: //repeat first layer cal.? case S::RepeatLay1Cal:
wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Do you want to repeat last step to readjust distance between nozzle and heatbed?"), false);////MSG_WIZARD_REPEAT_V2_CAL c=20 r=7 wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Do you want to repeat last step to readjust distance between nozzle and heatbed?"), false);////MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
if (wizard_event) if (wizard_event)
{ {
@ -4815,7 +4829,7 @@ void lcd_wizard(WizState state)
state = S::Finish; state = S::Finish;
} }
break; break;
case S::Finish: //we are finished case S::Finish:
eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0); eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0);
end = true; end = true;
break; break;

View File

@ -223,12 +223,12 @@ bool lcd_autoDepleteEnabled();
//! @brief Wizard state //! @brief Wizard state
enum class WizState : uint8_t enum class WizState : uint8_t
{ {
Run, //!< run wizard? Entry point. Run, //!< run wizard? Main entry point.
Restore, //!< restore calibration status Restore, //!< restore calibration status
Selftest, Selftest, //!< self test
Xyz, //!< xyz calibration Xyz, //!< xyz calibration
Z, //!< z calibration Z, //!< z calibration
IsFil, //!< Is filament loaded? Entry point for 1st layer calibration IsFil, //!< Is filament loaded? First step of 1st layer calibration
PreheatPla, //!< waiting for preheat nozzle for PLA PreheatPla, //!< waiting for preheat nozzle for PLA
Preheat, //!< Preheat for any material Preheat, //!< Preheat for any material
LoadFilCold, //!< Load filament for MMU LoadFilCold, //!< Load filament for MMU