fsensor: Use isReady instead of isEnabled

isEnabled() returns true if the filament sensor state machine is in error state. In most situations we don't want that.

It is sufficient to check if the filament sensor state machine is in Ready state.
This commit is contained in:
Guðni Már Gilbert 2025-01-12 18:49:27 +00:00
parent c4e0fdbabd
commit 7c99014c9d
2 changed files with 3 additions and 3 deletions

View File

@ -4380,7 +4380,7 @@ static void sheets_menu()
static void nozzle_change()
{
#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_return_to_status();
return;
@ -5348,7 +5348,7 @@ static void lcd_main_menu()
#endif //MMU_HAS_CUTTER
} else {
#ifdef FILAMENT_SENSOR
if (fsensor.isEnabled()) {
if (fsensor.isReady()) {
if (!fsensor.getAutoLoadEnabled()) {
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
}

View File

@ -379,7 +379,7 @@ bool filament_presence_check() {
goto done;
}
if (fsensor.isEnabled() && !fsensor.getFilamentPresent()) {
if (fsensor.isReady() && !fsensor.getFilamentPresent()) {
if (oCheckFilament == ClCheckMode::_None) {
goto done;
}