Fix MK2 build?
This commit is contained in:
parent
bbe1b1145e
commit
ea23e6d924
|
|
@ -376,7 +376,11 @@ void mmu_loop(void)
|
||||||
mmu_last_finda_response.start();
|
mmu_last_finda_response.start();
|
||||||
FDEBUG_PRINTF_P(PSTR("MMU => '%dok'\n"), mmu_finda);
|
FDEBUG_PRINTF_P(PSTR("MMU => '%dok'\n"), mmu_finda);
|
||||||
//printf_P(PSTR("Eact: %d\n"), int(e_active()));
|
//printf_P(PSTR("Eact: %d\n"), int(e_active()));
|
||||||
if (!mmu_finda && CHECK_FSENSOR && fsensor.isReady()) {
|
if (!mmu_finda
|
||||||
|
#ifdef FILAMENT_SENSOR ///temporary until refactoring
|
||||||
|
&& CHECK_FSENSOR && fsensor.isReady()
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
|
) {
|
||||||
stop_and_save_print_to_ram(0, 0);
|
stop_and_save_print_to_ram(0, 0);
|
||||||
restore_print_from_ram_and_continue(0);
|
restore_print_from_ram_and_continue(0);
|
||||||
if (mmu_extruder != MMU_FILAMENT_UNKNOWN) // Can't deplete unknown extruder.
|
if (mmu_extruder != MMU_FILAMENT_UNKNOWN) // Can't deplete unknown extruder.
|
||||||
|
|
|
||||||
|
|
@ -1819,8 +1819,11 @@ switch(eFilamentAction)
|
||||||
case FilamentAction::Lay1Cal:
|
case FilamentAction::Lay1Cal:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(lcd_clicked() || (((eFilamentAction == FilamentAction::Load) || (eFilamentAction == FilamentAction::AutoLoad)) && fsensor.getFilamentLoadEvent()))
|
if(lcd_clicked()
|
||||||
{
|
#ifdef FILAMENT_SENSOR
|
||||||
|
|| (((eFilamentAction == FilamentAction::Load) || (eFilamentAction == FilamentAction::AutoLoad)) && fsensor.getFilamentLoadEvent())
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
|
) {
|
||||||
nLevel=2;
|
nLevel=2;
|
||||||
if(!bFilamentPreheatState)
|
if(!bFilamentPreheatState)
|
||||||
{
|
{
|
||||||
|
|
@ -2143,8 +2146,11 @@ void lcd_wait_interact() {
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
|
|
||||||
lcd_puts_at_P(0, 1, _i("Insert filament"));////MSG_INSERT_FILAMENT c=20
|
lcd_puts_at_P(0, 1, _i("Insert filament"));////MSG_INSERT_FILAMENT c=20
|
||||||
if (!fsensor.getAutoLoadEnabled()) {
|
#ifdef FILAMENT_SENSOR
|
||||||
lcd_puts_at_P(0, 2, _i("and press the knob"));////MSG_PRESS c=20 r=2
|
if (!fsensor.getAutoLoadEnabled())
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
|
{
|
||||||
|
lcd_puts_at_P(0, 2, _i("and press the knob"));////MSG_PRESS c=20 r=2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3438,14 +3444,14 @@ static void lcd_show_sensors_state()
|
||||||
lcd_set_cursor(LCD_WIDTH - 3, 0);
|
lcd_set_cursor(LCD_WIDTH - 3, 0);
|
||||||
lcd_print_state(finda_state);
|
lcd_print_state(finda_state);
|
||||||
}
|
}
|
||||||
|
#ifdef FILAMENT_SENSOR
|
||||||
if (ir_sensor_detected) {
|
if (ir_sensor_detected) {
|
||||||
idler_state = fsensor.getFilamentPresent();
|
idler_state = fsensor.getFilamentPresent();
|
||||||
lcd_puts_at_P(0, 1, _T(MSG_FSENSOR));
|
lcd_puts_at_P(0, 1, _T(MSG_FSENSOR));
|
||||||
lcd_set_cursor(LCD_WIDTH - 3, 1);
|
lcd_set_cursor(LCD_WIDTH - 3, 1);
|
||||||
lcd_print_state(idler_state);
|
lcd_print_state(idler_state);
|
||||||
}
|
}
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
|
|
||||||
#ifdef PAT9125
|
#ifdef PAT9125
|
||||||
// Display X and Y difference from Filament sensor
|
// Display X and Y difference from Filament sensor
|
||||||
|
|
@ -3790,6 +3796,7 @@ void lcd_v2_calibration()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef FILAMENT_SENSOR
|
||||||
else if (!eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE))
|
else if (!eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE))
|
||||||
{
|
{
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
|
@ -3820,6 +3827,7 @@ void lcd_v2_calibration()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
|
|
||||||
eFilamentAction = FilamentAction::Lay1Cal;
|
eFilamentAction = FilamentAction::Lay1Cal;
|
||||||
menu_goto(lcd_generic_preheat_menu, 0, true, true);
|
menu_goto(lcd_generic_preheat_menu, 0, true, true);
|
||||||
|
|
@ -3900,7 +3908,11 @@ static void lcd_wizard_load()
|
||||||
|
|
||||||
bool lcd_autoDepleteEnabled()
|
bool lcd_autoDepleteEnabled()
|
||||||
{
|
{
|
||||||
return (lcd_autoDeplete && fsensor.isReady());
|
return (lcd_autoDeplete
|
||||||
|
#ifdef FILAMENT_SENSOR ///should be removed during mmu2 refactoring
|
||||||
|
&& fsensor.isReady()
|
||||||
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wizard_lay1cal_message(bool cold)
|
static void wizard_lay1cal_message(bool cold)
|
||||||
|
|
@ -4240,10 +4252,13 @@ static void settingsAutoDeplete()
|
||||||
{
|
{
|
||||||
if (mmu_enabled)
|
if (mmu_enabled)
|
||||||
{
|
{
|
||||||
|
#ifdef FILAMENT_SENSOR
|
||||||
if (fsensor.isError()) {
|
if (fsensor.isError()) {
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), _T(MSG_NA), fsensor_reinit);
|
MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), _T(MSG_NA), fsensor_reinit);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
|
{
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), lcd_autoDeplete ? _T(MSG_ON) : _T(MSG_OFF), auto_deplete_switch);
|
MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), lcd_autoDeplete ? _T(MSG_ON) : _T(MSG_OFF), auto_deplete_switch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
|
|
||||||
// Filament sensor
|
// Filament sensor
|
||||||
#define FILAMENT_SENSOR
|
#define FILAMENT_SENSOR
|
||||||
#define PAT9125
|
#define FILAMENT_SENSOR_TYPE FSENSOR_PAT9125
|
||||||
|
|
||||||
#define DEBUG_DCODE2
|
#define DEBUG_DCODE2
|
||||||
#define DEBUG_DCODE3
|
#define DEBUG_DCODE3
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
// Filament sensor
|
// Filament sensor
|
||||||
#define FILAMENT_SENSOR
|
#define FILAMENT_SENSOR
|
||||||
#define PAT9125
|
#define FILAMENT_SENSOR_TYPE FSENSOR_PAT9125
|
||||||
|
|
||||||
#define DEBUG_DCODE2
|
#define DEBUG_DCODE2
|
||||||
#define DEBUG_DCODE3
|
#define DEBUG_DCODE3
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@
|
||||||
|
|
||||||
// Filament sensor
|
// Filament sensor
|
||||||
#define FILAMENT_SENSOR
|
#define FILAMENT_SENSOR
|
||||||
#define PAT9125
|
#define FILAMENT_SENSOR_TYPE FSENSOR_PAT9125
|
||||||
|
|
||||||
// Backlash -
|
// Backlash -
|
||||||
//#define BACKLASH_X
|
//#define BACKLASH_X
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue