Filament sensor not responding - (PFW-41)
build number = 130
This commit is contained in:
parent
124a3e6da8
commit
7204e91ec6
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
// Firmware version
|
// Firmware version
|
||||||
#define FW_version "3.1.1-RC1"
|
#define FW_version "3.1.1-RC1"
|
||||||
#define FW_build 129
|
#define FW_build 130
|
||||||
//#define FW_build --BUILD-NUMBER--
|
//#define FW_build --BUILD-NUMBER--
|
||||||
#define FW_version_build FW_version " b" STR(FW_build)
|
#define FW_version_build FW_version " b" STR(FW_build)
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -912,7 +912,11 @@ void setup()
|
|||||||
int pat9125 = pat9125_init(PAT9125_XRES, PAT9125_YRES);
|
int pat9125 = pat9125_init(PAT9125_XRES, PAT9125_YRES);
|
||||||
printf_P(PSTR("PAT9125_init:%d\n"), pat9125);
|
printf_P(PSTR("PAT9125_init:%d\n"), pat9125);
|
||||||
uint8_t fsensor = eeprom_read_byte((uint8_t*)EEPROM_FSENSOR);
|
uint8_t fsensor = eeprom_read_byte((uint8_t*)EEPROM_FSENSOR);
|
||||||
if (!pat9125) fsensor = 0; //disable sensor
|
if (!pat9125)
|
||||||
|
{
|
||||||
|
fsensor = 0; //disable sensor
|
||||||
|
fsensor_not_responding = true;
|
||||||
|
}
|
||||||
puts_P(PSTR("FSensor "));
|
puts_P(PSTR("FSensor "));
|
||||||
if (fsensor)
|
if (fsensor)
|
||||||
{
|
{
|
||||||
|
@ -34,6 +34,7 @@ void fsensor_restore_print_and_continue()
|
|||||||
uint8_t fsensor_int_pin_old = 0;
|
uint8_t fsensor_int_pin_old = 0;
|
||||||
int16_t fsensor_chunk_len = FSENSOR_CHUNK_LEN;
|
int16_t fsensor_chunk_len = FSENSOR_CHUNK_LEN;
|
||||||
bool fsensor_enabled = true;
|
bool fsensor_enabled = true;
|
||||||
|
bool fsensor_not_responding = false;
|
||||||
//bool fsensor_ignore_error = true;
|
//bool fsensor_ignore_error = true;
|
||||||
bool fsensor_M600 = false;
|
bool fsensor_M600 = false;
|
||||||
uint8_t fsensor_err_cnt = 0;
|
uint8_t fsensor_err_cnt = 0;
|
||||||
@ -47,6 +48,10 @@ bool fsensor_enable()
|
|||||||
puts_P(PSTR("fsensor_enable\n"));
|
puts_P(PSTR("fsensor_enable\n"));
|
||||||
int pat9125 = pat9125_init(PAT9125_XRES, PAT9125_YRES);
|
int pat9125 = pat9125_init(PAT9125_XRES, PAT9125_YRES);
|
||||||
printf_P(PSTR("PAT9125_init:%d\n"), pat9125);
|
printf_P(PSTR("PAT9125_init:%d\n"), pat9125);
|
||||||
|
if (pat9125)
|
||||||
|
fsensor_not_responding = false;
|
||||||
|
else
|
||||||
|
fsensor_not_responding = true;
|
||||||
fsensor_enabled = pat9125?true:false;
|
fsensor_enabled = pat9125?true:false;
|
||||||
// fsensor_ignore_error = true;
|
// fsensor_ignore_error = true;
|
||||||
fsensor_M600 = false;
|
fsensor_M600 = false;
|
||||||
@ -97,7 +102,12 @@ ISR(PCINT2_vect)
|
|||||||
/* *digitalPinToPCMSK(fsensor_int_pin) &= ~bit(digitalPinToPCMSKbit(fsensor_int_pin));
|
/* *digitalPinToPCMSK(fsensor_int_pin) &= ~bit(digitalPinToPCMSKbit(fsensor_int_pin));
|
||||||
digitalWrite(fsensor_int_pin, HIGH);
|
digitalWrite(fsensor_int_pin, HIGH);
|
||||||
*digitalPinToPCMSK(fsensor_int_pin) |= bit(digitalPinToPCMSKbit(fsensor_int_pin));*/
|
*digitalPinToPCMSK(fsensor_int_pin) |= bit(digitalPinToPCMSKbit(fsensor_int_pin));*/
|
||||||
pat9125_update_y();
|
if (!pat9125_update_y())
|
||||||
|
{
|
||||||
|
puts_P(PSTR("pat9125 not responding.\n"));
|
||||||
|
fsensor_disable();
|
||||||
|
fsensor_not_responding = true;
|
||||||
|
}
|
||||||
if (st_cnt != 0)
|
if (st_cnt != 0)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_FSENSOR_LOG
|
#ifdef DEBUG_FSENSOR_LOG
|
||||||
|
@ -27,6 +27,9 @@ extern int16_t fsensor_chunk_len;
|
|||||||
extern bool fsensor_M600;
|
extern bool fsensor_M600;
|
||||||
//enable/disable flag
|
//enable/disable flag
|
||||||
extern bool fsensor_enabled;
|
extern bool fsensor_enabled;
|
||||||
|
//not responding flag
|
||||||
|
extern bool fsensor_not_responding;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif //FSENSOR_H
|
#endif //FSENSOR_H
|
||||||
|
@ -719,6 +719,13 @@ const char * const MSG_FREE_MEMORY_LANG_TABLE[1] PROGMEM = {
|
|||||||
MSG_FREE_MEMORY_EN
|
MSG_FREE_MEMORY_EN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char MSG_FSENSOR_NA_EN[] PROGMEM = "Fil. sensor [N/A]";
|
||||||
|
const char MSG_FSENSOR_NA_CZ[] PROGMEM = "Fil. senzor [err]";
|
||||||
|
const char * const MSG_FSENSOR_NA_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||||
|
MSG_FSENSOR_NA_EN,
|
||||||
|
MSG_FSENSOR_NA_CZ
|
||||||
|
};
|
||||||
|
|
||||||
const char MSG_FSENSOR_OFF_EN[] PROGMEM = "Fil. sensor [off]";
|
const char MSG_FSENSOR_OFF_EN[] PROGMEM = "Fil. sensor [off]";
|
||||||
const char MSG_FSENSOR_OFF_CZ[] PROGMEM = "Fil. senzor [vyp]";
|
const char MSG_FSENSOR_OFF_CZ[] PROGMEM = "Fil. senzor [vyp]";
|
||||||
const char * const MSG_FSENSOR_OFF_LANG_TABLE[LANG_NUM] PROGMEM = {
|
const char * const MSG_FSENSOR_OFF_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||||
|
@ -254,6 +254,8 @@ extern const char* const MSG_FOLLOW_CALIBRATION_FLOW_LANG_TABLE[LANG_NUM];
|
|||||||
#define MSG_FOLLOW_CALIBRATION_FLOW LANG_TABLE_SELECT(MSG_FOLLOW_CALIBRATION_FLOW_LANG_TABLE)
|
#define MSG_FOLLOW_CALIBRATION_FLOW LANG_TABLE_SELECT(MSG_FOLLOW_CALIBRATION_FLOW_LANG_TABLE)
|
||||||
extern const char* const MSG_FREE_MEMORY_LANG_TABLE[1];
|
extern const char* const MSG_FREE_MEMORY_LANG_TABLE[1];
|
||||||
#define MSG_FREE_MEMORY LANG_TABLE_SELECT_EXPLICIT(MSG_FREE_MEMORY_LANG_TABLE, 0)
|
#define MSG_FREE_MEMORY LANG_TABLE_SELECT_EXPLICIT(MSG_FREE_MEMORY_LANG_TABLE, 0)
|
||||||
|
extern const char* const MSG_FSENSOR_NA_LANG_TABLE[LANG_NUM];
|
||||||
|
#define MSG_FSENSOR_NA LANG_TABLE_SELECT(MSG_FSENSOR_NA_LANG_TABLE)
|
||||||
extern const char* const MSG_FSENSOR_OFF_LANG_TABLE[LANG_NUM];
|
extern const char* const MSG_FSENSOR_OFF_LANG_TABLE[LANG_NUM];
|
||||||
#define MSG_FSENSOR_OFF LANG_TABLE_SELECT(MSG_FSENSOR_OFF_LANG_TABLE)
|
#define MSG_FSENSOR_OFF LANG_TABLE_SELECT(MSG_FSENSOR_OFF_LANG_TABLE)
|
||||||
extern const char* const MSG_FSENSOR_ON_LANG_TABLE[LANG_NUM];
|
extern const char* const MSG_FSENSOR_ON_LANG_TABLE[LANG_NUM];
|
||||||
|
@ -338,6 +338,7 @@
|
|||||||
|
|
||||||
#define MSG_CALIBRATE_Z_AUTO "Kalibruji Z"
|
#define MSG_CALIBRATE_Z_AUTO "Kalibruji Z"
|
||||||
#define MSG_FSENSOR_OFF "Fil. senzor [vyp]"
|
#define MSG_FSENSOR_OFF "Fil. senzor [vyp]"
|
||||||
|
#define MSG_FSENSOR_NA "Fil. senzor [err]"
|
||||||
#define MSG_FSENSOR_ON "Fil. senzor [zap]"
|
#define MSG_FSENSOR_ON "Fil. senzor [zap]"
|
||||||
#define MSG_CRASHDETECT_ON "Crash det. [zap]"
|
#define MSG_CRASHDETECT_ON "Crash det. [zap]"
|
||||||
#define MSG_CRASHDETECT_OFF "Crash det. [vyp]"
|
#define MSG_CRASHDETECT_OFF "Crash det. [vyp]"
|
||||||
|
@ -344,6 +344,7 @@
|
|||||||
#define MSG_CRASHDETECT_OFF "Crash det. [off]"
|
#define MSG_CRASHDETECT_OFF "Crash det. [off]"
|
||||||
#define MSG_CRASHDETECT_ON "Crash det. [on]"
|
#define MSG_CRASHDETECT_ON "Crash det. [on]"
|
||||||
#define MSG_FSENSOR_OFF "Fil. sensor [off]"
|
#define MSG_FSENSOR_OFF "Fil. sensor [off]"
|
||||||
|
#define MSG_FSENSOR_NA "Fil. sensor [N/A]"
|
||||||
#define MSG_FSENSOR_ON "Fil. sensor [on]"
|
#define MSG_FSENSOR_ON "Fil. sensor [on]"
|
||||||
|
|
||||||
#define(length=20, lines=4) MSG_PLACE_STEEL_SHEET "Please place steel sheet on heatbed."
|
#define(length=20, lines=4) MSG_PLACE_STEEL_SHEET "Please place steel sheet on heatbed."
|
||||||
|
@ -3687,6 +3687,8 @@ static void lcd_crash_menu()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool fsensor_not_responding;
|
||||||
|
|
||||||
static void lcd_settings_menu()
|
static void lcd_settings_menu()
|
||||||
{
|
{
|
||||||
EEPROM_read(EEPROM_SILENT, (uint8_t*)&SilentModeMenu, sizeof(SilentModeMenu));
|
EEPROM_read(EEPROM_SILENT, (uint8_t*)&SilentModeMenu, sizeof(SilentModeMenu));
|
||||||
@ -3705,7 +3707,10 @@ static void lcd_settings_menu()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (FSensorStateMenu == 0) {
|
if (FSensorStateMenu == 0) {
|
||||||
MENU_ITEM(function, MSG_FSENSOR_OFF, lcd_fsensor_state_set);
|
if (fsensor_not_responding)
|
||||||
|
MENU_ITEM(function, MSG_FSENSOR_NA, lcd_fsensor_state_set);
|
||||||
|
else
|
||||||
|
MENU_ITEM(function, MSG_FSENSOR_OFF, lcd_fsensor_state_set);
|
||||||
} else {
|
} else {
|
||||||
MENU_ITEM(function, MSG_FSENSOR_ON, lcd_fsensor_state_set);
|
MENU_ITEM(function, MSG_FSENSOR_ON, lcd_fsensor_state_set);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user