Merge 7c99014c9d into f3e0dfd481
This commit is contained in:
commit
0ce3c3db63
|
|
@ -4047,7 +4047,8 @@ static void fsensor_reinit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_fsensor_enabled_set(void) {
|
static void lcd_fsensor_enabled_set(void) {
|
||||||
fsensor.setEnabled(!fsensor.isEnabled());
|
bool current_setting = eeprom_read_byte((uint8_t *)EEPROM_FSENSOR);
|
||||||
|
fsensor.setEnabled(!current_setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_fsensor_runout_set() {
|
static void lcd_fsensor_runout_set() {
|
||||||
|
|
@ -4084,7 +4085,7 @@ static void lcd_fsensor_settings_menu() {
|
||||||
MENU_BEGIN();
|
MENU_BEGIN();
|
||||||
MENU_ITEM_BACK_P(_T(MSG_BACK));
|
MENU_ITEM_BACK_P(_T(MSG_BACK));
|
||||||
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR), fsensor.isEnabled() ? _T(MSG_ON) : _T(MSG_OFF), lcd_fsensor_enabled_set);
|
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR), eeprom_read_byte((uint8_t *)EEPROM_FSENSOR) ? _T(MSG_ON) : _T(MSG_OFF), lcd_fsensor_enabled_set);
|
||||||
|
|
||||||
if (fsensor.isEnabled()) {
|
if (fsensor.isEnabled()) {
|
||||||
if (fsensor.isError()) {
|
if (fsensor.isError()) {
|
||||||
|
|
@ -4379,7 +4380,7 @@ static void sheets_menu()
|
||||||
static void nozzle_change()
|
static void nozzle_change()
|
||||||
{
|
{
|
||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
if (fsensor.isEnabled() && fsensor.getFilamentPresent()) {
|
if (fsensor.isReady() && fsensor.getFilamentPresent()) {
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_UNLOAD_FILAMENT_REPEAT));
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_UNLOAD_FILAMENT_REPEAT));
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
return;
|
return;
|
||||||
|
|
@ -5347,7 +5348,7 @@ static void lcd_main_menu()
|
||||||
#endif //MMU_HAS_CUTTER
|
#endif //MMU_HAS_CUTTER
|
||||||
} else {
|
} else {
|
||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
if (fsensor.isEnabled()) {
|
if (fsensor.isReady()) {
|
||||||
if (!fsensor.getAutoLoadEnabled()) {
|
if (!fsensor.getAutoLoadEnabled()) {
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,7 @@ bool filament_presence_check() {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fsensor.isEnabled() && !fsensor.getFilamentPresent()) {
|
if (fsensor.isReady() && !fsensor.getFilamentPresent()) {
|
||||||
if (oCheckFilament == ClCheckMode::_None) {
|
if (oCheckFilament == ClCheckMode::_None) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue