|
@@ -111,6 +111,9 @@ int8_t FSensorStateMenu = 1;
|
|
|
|
|
|
int8_t CrashDetectMenu = 1;
|
|
|
|
|
|
+extern void fsensor_block();
|
|
|
+extern void fsensor_unblock();
|
|
|
+
|
|
|
extern bool fsensor_enable();
|
|
|
extern void fsensor_disable();
|
|
|
|
|
@@ -374,7 +377,6 @@ void set_language_from_EEPROM() {
|
|
|
|
|
|
static void lcd_status_screen()
|
|
|
{
|
|
|
-
|
|
|
if (firstrun == 1)
|
|
|
{
|
|
|
firstrun = 0;
|
|
@@ -2654,11 +2656,16 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg)
|
|
|
while (lcd_clicked()) ;
|
|
|
delay(10);
|
|
|
while (lcd_clicked()) ;
|
|
|
- KEEPALIVE_STATE(IN_HANDLER);
|
|
|
- lcd_set_custom_characters();
|
|
|
- lcd_update_enable(true);
|
|
|
- lcd_update(2);
|
|
|
- return;
|
|
|
+ if (msg_next == NULL) {
|
|
|
+ KEEPALIVE_STATE(IN_HANDLER);
|
|
|
+ lcd_set_custom_characters();
|
|
|
+ lcd_update_enable(true);
|
|
|
+ lcd_update(2);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (multi_screen) {
|
|
@@ -3626,15 +3633,16 @@ void lcd_wizard(int state) {
|
|
|
state = 7;
|
|
|
break;
|
|
|
case 7: //load filament
|
|
|
+ fsensor_block();
|
|
|
lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_LOAD_FILAMENT);
|
|
|
lcd_update_enable(false);
|
|
|
lcd_implementation_clear();
|
|
|
lcd_print_at_PGM(0, 2, MSG_LOADING_FILAMENT);
|
|
|
- loading_flag = true;
|
|
|
#ifdef SNMM
|
|
|
change_extr(0);
|
|
|
#endif
|
|
|
gcode_M701();
|
|
|
+ fsensor_unblock();
|
|
|
state = 9;
|
|
|
break;
|
|
|
case 8:
|
|
@@ -5566,16 +5574,27 @@ static bool lcd_selftest()
|
|
|
|
|
|
if (_result)
|
|
|
{
|
|
|
- _progress = lcd_selftest_screen(7, _progress, 3, true, 2000);
|
|
|
+ _progress = lcd_selftest_screen(7, _progress, 3, true, 2000); //check bed
|
|
|
_result = lcd_selfcheck_check_heater(true);
|
|
|
}
|
|
|
if (_result)
|
|
|
{
|
|
|
- _progress = lcd_selftest_screen(8, _progress, 3, true, 5000);
|
|
|
+ _progress = lcd_selftest_screen(8, _progress, 3, true, 2000); //bed ok
|
|
|
+#ifdef PAT9125
|
|
|
+ _progress = lcd_selftest_screen(9, _progress, 3, true, 2000); //check filaments sensor
|
|
|
+ _result = lcd_selftest_fsensor();
|
|
|
+#endif // PAT9125
|
|
|
+ }
|
|
|
+ if (_result)
|
|
|
+ {
|
|
|
+#ifdef PAT9125
|
|
|
+ _progress = lcd_selftest_screen(10, _progress, 3, true, 2000); //fil sensor OK
|
|
|
+#endif // PAT9125
|
|
|
+ _progress = lcd_selftest_screen(11, _progress, 3, true, 5000); //all correct
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- _progress = lcd_selftest_screen(9, _progress, 3, true, 5000);
|
|
|
+ _progress = lcd_selftest_screen(12, _progress, 3, true, 5000);
|
|
|
}
|
|
|
lcd_reset_alert_level();
|
|
|
enquecommand_P(PSTR("M84"));
|
|
@@ -6120,6 +6139,12 @@ static void lcd_selftest_error(int _error_no, const char *_error_1, const char *
|
|
|
lcd.setCursor(18, 3);
|
|
|
lcd.print(_error_1);
|
|
|
break;
|
|
|
+ case 11:
|
|
|
+ lcd.setCursor(0, 2);
|
|
|
+ lcd_printPGM(MSG_FILAMENT_SENSOR);
|
|
|
+ lcd.setCursor(0, 3);
|
|
|
+ lcd_printPGM(MSG_SELFTEST_WIRINGERROR);
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
delay(1000);
|
|
@@ -6136,6 +6161,18 @@ static void lcd_selftest_error(int _error_no, const char *_error_1, const char *
|
|
|
|
|
|
}
|
|
|
|
|
|
+#ifdef PAT9125
|
|
|
+static bool lcd_selftest_fsensor() {
|
|
|
+ fsensor_init();
|
|
|
+ if (fsensor_not_responding)
|
|
|
+ {
|
|
|
+ const char *_err;
|
|
|
+ lcd_selftest_error(11, _err, _err);
|
|
|
+ }
|
|
|
+ return(!fsensor_not_responding);
|
|
|
+}
|
|
|
+#endif //PAT9125
|
|
|
+
|
|
|
static bool lcd_selftest_fan_dialog(int _fan)
|
|
|
{
|
|
|
bool _result = true;
|
|
@@ -6160,10 +6197,10 @@ static bool lcd_selftest_fan_dialog(int _fan)
|
|
|
fanSpeed = 150; //print fan
|
|
|
for (uint8_t i = 0; i < 5; i++) {
|
|
|
delay_keep_alive(1000);
|
|
|
- lcd.setCursor(14, 3);
|
|
|
+ lcd.setCursor(18, 3);
|
|
|
lcd.print("-");
|
|
|
delay_keep_alive(1000);
|
|
|
- lcd.setCursor(14, 3);
|
|
|
+ lcd.setCursor(18, 3);
|
|
|
lcd.print("|");
|
|
|
}
|
|
|
fanSpeed = 0;
|
|
@@ -6214,22 +6251,31 @@ static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bo
|
|
|
if (_step == 5) lcd_printPGM(MSG_SELFTEST_CHECK_Y);
|
|
|
if (_step == 6) lcd_printPGM(MSG_SELFTEST_CHECK_Z);
|
|
|
if (_step == 7) lcd_printPGM(MSG_SELFTEST_CHECK_BED);
|
|
|
- if (_step == 8) lcd_printPGM(MSG_SELFTEST_CHECK_ALLCORRECT);
|
|
|
- if (_step == 9) lcd_printPGM(MSG_SELFTEST_FAILED);
|
|
|
+ if (_step == 8) lcd_printPGM(MSG_SELFTEST_CHECK_BED);
|
|
|
+ if (_step == 9) lcd_printPGM(MSG_SELFTEST_CHECK_FSENSOR);
|
|
|
+ if (_step == 10) lcd_printPGM(MSG_SELFTEST_CHECK_FSENSOR);
|
|
|
+ if (_step == 11) lcd_printPGM(MSG_SELFTEST_CHECK_ALLCORRECT);
|
|
|
+ if (_step == 12) lcd_printPGM(MSG_SELFTEST_FAILED);
|
|
|
|
|
|
lcd.setCursor(0, 1);
|
|
|
lcd.print("--------------------");
|
|
|
if ((_step >= -1) && (_step <= 1))
|
|
|
{
|
|
|
//SERIAL_ECHOLNPGM("Fan test");
|
|
|
- lcd_print_at_PGM(0, 2, PSTR("Extruder fan:"));
|
|
|
- lcd.setCursor(14, 2);
|
|
|
+ lcd_print_at_PGM(0, 2, MSG_SELFTEST_EXTRUDER_FAN_SPEED);
|
|
|
+ lcd.setCursor(18, 2);
|
|
|
(_step < 0) ? lcd.print(_indicator) : lcd.print("OK");
|
|
|
- lcd_print_at_PGM(0, 3, PSTR("Print fan:"));
|
|
|
- lcd.setCursor(14, 3);
|
|
|
+ lcd_print_at_PGM(0, 3, MSG_SELFTEST_PRINT_FAN_SPEED);
|
|
|
+ lcd.setCursor(18, 3);
|
|
|
(_step < 1) ? lcd.print(_indicator) : lcd.print("OK");
|
|
|
}
|
|
|
- else if (_step != 9)
|
|
|
+ else if (_step >= 9 && _step <= 10)
|
|
|
+ {
|
|
|
+ lcd_print_at_PGM(0, 2, MSG_SELFTEST_FILAMENT_SENSOR);
|
|
|
+ lcd.setCursor(18, 2);
|
|
|
+ (_step == 9) ? lcd.print(_indicator) : lcd.print("OK");
|
|
|
+ }
|
|
|
+ else if (_step < 9)
|
|
|
{
|
|
|
//SERIAL_ECHOLNPGM("Other tests");
|
|
|
_step_block = 3;
|