Fan test adjustments

This commit is contained in:
akukan 2016-10-13 10:40:15 +02:00
parent da5f1f71ea
commit 8cd558007c
5 changed files with 88 additions and 19 deletions

View file

@ -1840,24 +1840,58 @@ const char * const MSG_SELFTEST_START_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SELFTEST_START_EN
};
const char MSG_SELFTEST_COOLING_FAN_EN[] PROGMEM = "Print fan ok ?";
const char MSG_SELFTEST_FAN_EN[] PROGMEM = "Fan test";
const char MSG_SELFTEST_FAN_CZ[] PROGMEM = "Test ventilatoru";
const char * const MSG_SELFTEST_FAN_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SELFTEST_FAN_EN,
MSG_SELFTEST_FAN_CZ,
MSG_SELFTEST_FAN_EN,
MSG_SELFTEST_FAN_EN,
MSG_SELFTEST_FAN_EN
};
const char MSG_SELFTEST_COOLING_FAN_EN[] PROGMEM = "Front print";
const char MSG_SELFTEST_COOLING_FAN_CZ[] PROGMEM = "Predni tiskovy";
const char * const MSG_SELFTEST_COOLING_FAN_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SELFTEST_COOLING_FAN_EN,
MSG_SELFTEST_COOLING_FAN_EN,
MSG_SELFTEST_COOLING_FAN_CZ,
MSG_SELFTEST_COOLING_FAN_EN,
MSG_SELFTEST_COOLING_FAN_EN,
MSG_SELFTEST_COOLING_FAN_EN
};
const char MSG_SELFTEST_EXTRUDER_FAN_EN[] PROGMEM = "Fan ok ?";
const char MSG_SELFTEST_EXTRUDER_FAN_EN[] PROGMEM = "Left hotend";
const char MSG_SELFTEST_EXTRUDER_FAN_CZ[] PROGMEM = "Levy na trysce";
const char * const MSG_SELFTEST_EXTRUDER_FAN_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SELFTEST_EXTRUDER_FAN_EN,
MSG_SELFTEST_EXTRUDER_FAN_EN,
MSG_SELFTEST_EXTRUDER_FAN_CZ,
MSG_SELFTEST_EXTRUDER_FAN_EN,
MSG_SELFTEST_EXTRUDER_FAN_EN,
MSG_SELFTEST_EXTRUDER_FAN_EN
};
const char MSG_SELFTEST_FAN_YES_EN[] PROGMEM = "Spinning";
const char MSG_SELFTEST_FAN_YES_CZ[] PROGMEM = "Toci se";
const char * const MSG_SELFTEST_FAN_YES_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SELFTEST_FAN_YES_EN,
MSG_SELFTEST_FAN_YES_CZ,
MSG_SELFTEST_FAN_YES_EN,
MSG_SELFTEST_FAN_YES_EN,
MSG_SELFTEST_FAN_YES_EN
};
const char MSG_SELFTEST_FAN_NO_EN[] PROGMEM = "Not spinning";
const char MSG_SELFTEST_FAN_NO_CZ[] PROGMEM = "Netoci se";
const char * const MSG_SELFTEST_FAN_NO_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SELFTEST_FAN_NO_EN,
MSG_SELFTEST_FAN_NO_CZ,
MSG_SELFTEST_FAN_NO_EN,
MSG_SELFTEST_FAN_NO_EN,
MSG_SELFTEST_FAN_NO_EN
};
const char MSG_SELFTEST_WIRINGERROR_EN[] PROGMEM = "Wiring error";
const char MSG_SELFTEST_WIRINGERROR_CZ[] PROGMEM = "Chyba zapojeni";
const char MSG_SELFTEST_WIRINGERROR_IT[] PROGMEM = "Errore cablaggio";

View file

@ -418,10 +418,16 @@ extern const char* const MSG_SELFTEST_PLEASECHECK_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_PLEASECHECK LANG_TABLE_SELECT(MSG_SELFTEST_PLEASECHECK_LANG_TABLE)
extern const char* const MSG_SELFTEST_START_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_START LANG_TABLE_SELECT(MSG_SELFTEST_START_LANG_TABLE)
extern const char* const MSG_SELFTEST_FAN_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_FAN LANG_TABLE_SELECT(MSG_SELFTEST_FAN_LANG_TABLE)
extern const char* const MSG_SELFTEST_EXTRUDER_FAN_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_EXTRUDER_FAN LANG_TABLE_SELECT(MSG_SELFTEST_EXTRUDER_FAN_LANG_TABLE)
extern const char* const MSG_SELFTEST_COOLING_FAN_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_COOLING_FAN LANG_TABLE_SELECT(MSG_SELFTEST_COOLING_FAN_LANG_TABLE)
extern const char* const MSG_SELFTEST_FAN_YES_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_FAN_YES LANG_TABLE_SELECT(MSG_SELFTEST_FAN_YES_LANG_TABLE)
extern const char* const MSG_SELFTEST_FAN_NO_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_FAN_NO LANG_TABLE_SELECT(MSG_SELFTEST_FAN_NO_LANG_TABLE)
extern const char* const MSG_SELFTEST_WIRINGERROR_LANG_TABLE[LANG_NUM];
#define MSG_SELFTEST_WIRINGERROR LANG_TABLE_SELECT(MSG_SELFTEST_WIRINGERROR_LANG_TABLE)
extern const char* const MSG_SERIAL_ERROR_MENU_STRUCTURE_LANG_TABLE[1];

View file

@ -170,6 +170,11 @@
#define MSG_SELFTEST_ENDSTOP "Endstop"
#define MSG_SELFTEST_ENDSTOP_NOTHIT "Endstop not hit"
#define MSG_SELFTEST_OK "Self test OK"
#define MSG_SELFTEST_FAN "Test ventilatoru";
#define MSG_SELFTEST_COOLING_FAN "Predni tiskovy";
#define MSG_SELFTEST_EXTRUDER_FAN "Levy na trysce";
#define MSG_SELFTEST_FAN_YES "Toci se";
#define MSG_SELFTEST_FAN_NO "Netoci se";
#define MSG_STATS_TOTALFILAMENT "Filament celkem :"
#define MSG_STATS_TOTALPRINTTIME "Celkovy cas :"

View file

@ -164,8 +164,11 @@
#define MSG_SELFTEST_ENDSTOP "Endstop"
#define MSG_SELFTEST_ENDSTOP_NOTHIT "Endstop not hit"
#define MSG_SELFTEST_OK "Self test OK"
#define MSG_SELFTEST_COOLING_FAN "Print fan ok ?";
#define MSG_SELFTEST_EXTRUDER_FAN "Fan ok ?";
#define MSG_SELFTEST_FAN "Fan test";
#define MSG_SELFTEST_COOLING_FAN "Front print";
#define MSG_SELFTEST_EXTRUDER_FAN "Left hotend";
#define MSG_SELFTEST_FAN_YES "Spinning";
#define MSG_SELFTEST_FAN_NO "Not spinning";
#define(length=20) MSG_STATS_TOTALFILAMENT "Total filament :"
#define(length=20) MSG_STATS_TOTALPRINTTIME "Total print time :"
#define(length=20) MSG_STATS_FILAMENTUSED "Filament used: "

View file

@ -2823,7 +2823,7 @@ static void lcd_selftest()
bool _result = false;
lcd_implementation_clear();
lcd.setCursor(0, 0); lcd_printPGM(MSG_SELFTEST);
lcd.setCursor(0, 0); lcd_printPGM(MSG_SELFTEST_START);
delay(2000);
@ -2837,13 +2837,9 @@ static void lcd_selftest()
if (_result)
{
_progress = lcd_selftest_screen(0, _progress, 3, true, 2000);
_progress = lcd_selftest_screen(-1, _progress, 4, true, 3000);
_result = lcd_selfcheck_endstops();
}
_progress = lcd_selftest_screen(0, _progress, 3, true, 2000);
_result = lcd_selfcheck_endstops();
if (_result)
{
_progress = lcd_selftest_screen(1, _progress, 3, true, 1000);
@ -3125,6 +3121,22 @@ static void lcd_selftest_error(int _error_no, const char *_error_1, const char *
lcd.setCursor(18, 3);
lcd.print(_error_1);
break;
case 6:
lcd.setCursor(0, 2);
lcd_printPGM(MSG_SELFTEST_COOLING_FAN);
lcd.setCursor(0, 3);
lcd_printPGM(MSG_SELFTEST_WIRINGERROR);
lcd.setCursor(18, 3);
lcd.print(_error_1);
break;
case 7:
lcd.setCursor(0, 2);
lcd_printPGM(MSG_SELFTEST_EXTRUDER_FAN);
lcd.setCursor(0, 3);
lcd_printPGM(MSG_SELFTEST_WIRINGERROR);
lcd.setCursor(18, 3);
lcd.print(_error_1);
break;
}
@ -3145,9 +3157,10 @@ static void lcd_selftest_error(int _error_no, const char *_error_1, const char *
static bool lcd_selftest_fan_dialog(int _fan)
{
bool _result = false;
int _errno = 0;
lcd_implementation_clear();
lcd.setCursor(0, 0); lcd_printPGM(MSG_SELFTEST);
lcd.setCursor(0, 0); lcd_printPGM(MSG_SELFTEST_FAN);
switch (_fan)
{
case 1:
@ -3155,19 +3168,21 @@ static bool lcd_selftest_fan_dialog(int _fan)
lcd.setCursor(0, 1); lcd_printPGM(MSG_SELFTEST_EXTRUDER_FAN);
SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN);
WRITE(EXTRUDER_0_AUTO_FAN_PIN, 1);
_errno = 7;
break;
case 2:
// object cooling fan
lcd.setCursor(0, 1); lcd_printPGM(MSG_SELFTEST_COOLING_FAN);
SET_OUTPUT(FAN_PIN);
analogWrite(FAN_PIN, 255);
_errno = 6;
break;
}
delay(500);
lcd.setCursor(1, 2); lcd_printPGM(MSG_YES);
lcd.setCursor(1, 2); lcd_printPGM(MSG_SELFTEST_FAN_YES);
lcd.setCursor(0, 3); lcd.print(">");
lcd.setCursor(1, 3); lcd_printPGM(MSG_NO);
lcd.setCursor(1, 3); lcd_printPGM(MSG_SELFTEST_FAN_NO);
@ -3197,17 +3212,17 @@ static bool lcd_selftest_fan_dialog(int _fan)
if (enc_dif > encoderDiff) {
_result = true;
lcd.setCursor(0, 2); lcd.print(">");
lcd.setCursor(1, 2); lcd_printPGM(MSG_YES);
lcd.setCursor(1, 2); lcd_printPGM(MSG_SELFTEST_FAN_YES);
lcd.setCursor(0, 3); lcd.print(" ");
lcd.setCursor(1, 3); lcd_printPGM(MSG_NO);
lcd.setCursor(1, 3); lcd_printPGM(MSG_SELFTEST_FAN_NO);
}
if (enc_dif < encoderDiff) {
_result = false;
lcd.setCursor(0, 2); lcd.print(" ");
lcd.setCursor(1, 2); lcd_printPGM(MSG_YES);
lcd.setCursor(1, 2); lcd_printPGM(MSG_SELFTEST_FAN_YES);
lcd.setCursor(0, 3); lcd.print(">");
lcd.setCursor(1, 3); lcd_printPGM(MSG_NO);
lcd.setCursor(1, 3); lcd_printPGM(MSG_SELFTEST_FAN_NO);
}
enc_dif = 0;
encoderDiff = 0;
@ -3233,6 +3248,12 @@ static bool lcd_selftest_fan_dialog(int _fan)
fanSpeed = 0;
manage_heater();
if (!_result)
{
const char *_err;
lcd_selftest_error(_errno, _err, _err);
}
return _result;
}