Merge pull request #1279 from PavelSindler/turn_on_FINDA
mmu2: filament senor (FINDA) menu fix
This commit is contained in:
commit
16c2f6fe8e
2 changed files with 24 additions and 17 deletions
Firmware
|
@ -11,6 +11,7 @@
|
||||||
#include "cmdqueue.h"
|
#include "cmdqueue.h"
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
#include "ConfigurationStore.h"
|
#include "ConfigurationStore.h"
|
||||||
|
#include "mmu.h"
|
||||||
|
|
||||||
//! @name Basic parameters
|
//! @name Basic parameters
|
||||||
//! @{
|
//! @{
|
||||||
|
@ -143,21 +144,27 @@ void fsensor_init(void)
|
||||||
|
|
||||||
bool fsensor_enable(void)
|
bool fsensor_enable(void)
|
||||||
{
|
{
|
||||||
uint8_t pat9125 = pat9125_init();
|
if (mmu_enabled == false) { //filament sensor is pat9125, enable only if it is working
|
||||||
printf_P(PSTR("PAT9125_init:%hhu\n"), pat9125);
|
uint8_t pat9125 = pat9125_init();
|
||||||
if (pat9125)
|
printf_P(PSTR("PAT9125_init:%hhu\n"), pat9125);
|
||||||
fsensor_not_responding = false;
|
if (pat9125)
|
||||||
else
|
fsensor_not_responding = false;
|
||||||
fsensor_not_responding = true;
|
else
|
||||||
fsensor_enabled = pat9125?true:false;
|
fsensor_not_responding = true;
|
||||||
fsensor_watch_runout = true;
|
fsensor_enabled = pat9125 ? true : false;
|
||||||
fsensor_oq_meassure = false;
|
fsensor_watch_runout = true;
|
||||||
fsensor_err_cnt = 0;
|
fsensor_oq_meassure = false;
|
||||||
fsensor_dy_old = 0;
|
fsensor_err_cnt = 0;
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, fsensor_enabled?0x01:0x00);
|
fsensor_dy_old = 0;
|
||||||
FSensorStateMenu = fsensor_enabled?1:0;
|
eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, fsensor_enabled ? 0x01 : 0x00);
|
||||||
|
FSensorStateMenu = fsensor_enabled ? 1 : 0;
|
||||||
|
}
|
||||||
|
else //filament sensor is FINDA, always enable
|
||||||
|
{
|
||||||
|
fsensor_enabled = true;
|
||||||
|
eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x01);
|
||||||
|
FSensorStateMenu = 1;
|
||||||
|
}
|
||||||
return fsensor_enabled;
|
return fsensor_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4644,7 +4644,7 @@ do\
|
||||||
{\
|
{\
|
||||||
if (FSensorStateMenu == 0)\
|
if (FSensorStateMenu == 0)\
|
||||||
{\
|
{\
|
||||||
if (fsensor_not_responding)\
|
if (fsensor_not_responding && (mmu_enabled == false))\
|
||||||
{\
|
{\
|
||||||
/* Filament sensor not working*/\
|
/* Filament sensor not working*/\
|
||||||
MENU_ITEM_FUNCTION_P(_i("Fil. sensor [N/A]"), lcd_fsensor_state_set);/*////MSG_FSENSOR_NA c=0 r=0*/\
|
MENU_ITEM_FUNCTION_P(_i("Fil. sensor [N/A]"), lcd_fsensor_state_set);/*////MSG_FSENSOR_NA c=0 r=0*/\
|
||||||
|
@ -4654,7 +4654,7 @@ do\
|
||||||
{\
|
{\
|
||||||
/* Filament sensor turned off, working, no problems*/\
|
/* Filament sensor turned off, working, no problems*/\
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_FSENSOR_OFF), lcd_fsensor_state_set);\
|
MENU_ITEM_FUNCTION_P(_T(MSG_FSENSOR_OFF), lcd_fsensor_state_set);\
|
||||||
if (mmu_enabled == false)if (mmu_enabled == false)\
|
if (mmu_enabled == false)\
|
||||||
{\
|
{\
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_FSENS_AUTOLOAD_NA), lcd_filament_autoload_info);\
|
MENU_ITEM_SUBMENU_P(_T(MSG_FSENS_AUTOLOAD_NA), lcd_filament_autoload_info);\
|
||||||
}\
|
}\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue