selftest: Handle thermal errors in lcd_selfcheck_check_heater
- Simplify lcd_selfcheck_check_heater loop - Check for/abort on Stopped (indicating a thermal failure).
This commit is contained in:
parent
d2019b70f2
commit
6d83a494d6
1 changed files with 26 additions and 26 deletions
|
@ -6996,11 +6996,7 @@ static bool lcd_selfcheck_endstops()
|
||||||
|
|
||||||
static bool lcd_selfcheck_check_heater(bool _isbed)
|
static bool lcd_selfcheck_check_heater(bool _isbed)
|
||||||
{
|
{
|
||||||
uint8_t _counter = 0;
|
|
||||||
uint8_t _progress = 0;
|
uint8_t _progress = 0;
|
||||||
bool _stepresult = false;
|
|
||||||
bool _docycle = true;
|
|
||||||
|
|
||||||
int _checked_snapshot = (_isbed) ? degBed() : degHotend(0);
|
int _checked_snapshot = (_isbed) ? degBed() : degHotend(0);
|
||||||
int _opposite_snapshot = (_isbed) ? degHotend(0) : degBed();
|
int _opposite_snapshot = (_isbed) ? degHotend(0) : degBed();
|
||||||
uint8_t _cycles = (_isbed) ? 180 : 60; //~ 90s / 30s
|
uint8_t _cycles = (_isbed) ? 180 : 60; //~ 90s / 30s
|
||||||
|
@ -7010,13 +7006,13 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
|
||||||
manage_heater();
|
manage_heater();
|
||||||
manage_inactivity(true);
|
manage_inactivity(true);
|
||||||
|
|
||||||
do {
|
for(uint8_t _counter = 0; _counter < _cycles && !Stopped; ++_counter)
|
||||||
_counter++;
|
{
|
||||||
_docycle = (_counter < _cycles) ? true : false;
|
|
||||||
|
|
||||||
manage_heater();
|
manage_heater();
|
||||||
manage_inactivity(true);
|
manage_inactivity(true);
|
||||||
_progress = (_isbed) ? lcd_selftest_screen(TestScreen::Bed, _progress, 2, false, 400) : lcd_selftest_screen(TestScreen::Hotend, _progress, 2, false, 400);
|
_progress = (_isbed?
|
||||||
|
lcd_selftest_screen(TestScreen::Bed, _progress, 2, false, 400) :
|
||||||
|
lcd_selftest_screen(TestScreen::Hotend, _progress, 2, false, 400));
|
||||||
/*if (_isbed) {
|
/*if (_isbed) {
|
||||||
MYSERIAL.print("Bed temp:");
|
MYSERIAL.print("Bed temp:");
|
||||||
MYSERIAL.println(degBed());
|
MYSERIAL.println(degBed());
|
||||||
|
@ -7026,8 +7022,7 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
|
||||||
MYSERIAL.println(degHotend(0));
|
MYSERIAL.println(degHotend(0));
|
||||||
}*/
|
}*/
|
||||||
if(_counter%5 == 0) serialecho_temperatures(); //show temperatures once in two seconds
|
if(_counter%5 == 0) serialecho_temperatures(); //show temperatures once in two seconds
|
||||||
|
}
|
||||||
} while (_docycle);
|
|
||||||
|
|
||||||
target_temperature[0] = 0;
|
target_temperature[0] = 0;
|
||||||
target_temperature_bed = 0;
|
target_temperature_bed = 0;
|
||||||
|
@ -7043,21 +7038,26 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
|
||||||
MYSERIAL.println(_opposite_result);
|
MYSERIAL.println(_opposite_result);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_opposite_result < ((_isbed) ? 30 : 9))
|
bool _stepresult = false;
|
||||||
{
|
if (Stopped)
|
||||||
if (_checked_result >= ((_isbed) ? 9 : 30))
|
{
|
||||||
{
|
// thermal error occurred while heating the nozzle
|
||||||
_stepresult = true;
|
lcd_selftest_error(TestError::Heater, "", "");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lcd_selftest_error(TestError::Heater, "", "");
|
if (_opposite_result < ((_isbed) ? 30 : 9))
|
||||||
}
|
{
|
||||||
}
|
if (_checked_result >= ((_isbed) ? 9 : 30))
|
||||||
else
|
_stepresult = true;
|
||||||
{
|
else
|
||||||
lcd_selftest_error(TestError::Bed, "", "");
|
lcd_selftest_error(TestError::Heater, "", "");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lcd_selftest_error(TestError::Bed, "", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
manage_heater();
|
manage_heater();
|
||||||
manage_inactivity(true);
|
manage_inactivity(true);
|
||||||
|
|
Loading…
Reference in a new issue