Merge branch 'MK3' into lcd-optimisation-gudni
This commit is contained in:
commit
234add3c58
7 changed files with 25 additions and 68 deletions
|
@ -489,11 +489,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
|||
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
||||
//#define FAST_PWM_FAN
|
||||
|
||||
// Temperature status LEDs that display the hotend and bet temperature.
|
||||
// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
|
||||
// Otherwise the RED led is on. There is 1C hysteresis.
|
||||
//#define TEMP_STAT_LEDS
|
||||
|
||||
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
||||
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
|
||||
// is too low, you should also increment SOFT_PWM_SCALE.
|
||||
|
|
|
@ -260,10 +260,6 @@ bool Config_RetrieveSettings()
|
|||
{
|
||||
|
||||
EEPROM_readData(reinterpret_cast<uint8_t*>(EEPROM_M500_base), reinterpret_cast<uint8_t*>(&cs), sizeof(cs), "cs");
|
||||
|
||||
|
||||
if (cs.max_jerk[X_AXIS] > DEFAULT_XJERK) cs.max_jerk[X_AXIS] = DEFAULT_XJERK;
|
||||
if (cs.max_jerk[Y_AXIS] > DEFAULT_YJERK) cs.max_jerk[Y_AXIS] = DEFAULT_YJERK;
|
||||
calculate_extruder_multipliers();
|
||||
|
||||
//if max_feedrate_silent and max_acceleration_units_per_sq_second_silent were never stored to eeprom, use default values:
|
||||
|
|
|
@ -30,7 +30,7 @@ uint8_t selectedSerialPort = 0;
|
|||
// this is so I can support Attiny series and any other chip without a UART
|
||||
#if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H)
|
||||
|
||||
#if UART_PRESENT(SERIAL_PORT)
|
||||
#ifdef HAS_UART
|
||||
ring_buffer rx_buffer = { { 0 }, 0, 0 };
|
||||
#endif
|
||||
|
||||
|
|
|
@ -28,9 +28,12 @@
|
|||
#endif
|
||||
|
||||
// The presence of the UBRRH register is used to detect a UART.
|
||||
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
|
||||
(port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
|
||||
(port == 3 && defined(UBRR3H)))
|
||||
#if ((SERIAL_PORT == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
|
||||
(SERIAL_PORT == 1 && defined(UBRR1H)) || \
|
||||
(SERIAL_PORT == 2 && defined(UBRR2H)) || \
|
||||
(SERIAL_PORT == 3 && defined(UBRR3H)))
|
||||
#define HAS_UART
|
||||
#endif
|
||||
|
||||
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
|
||||
// requires two levels of indirection to expand macro values properly)
|
||||
|
@ -82,7 +85,7 @@ struct ring_buffer
|
|||
int tail;
|
||||
};
|
||||
|
||||
#if UART_PRESENT(SERIAL_PORT)
|
||||
#ifdef HAS_UART
|
||||
extern ring_buffer rx_buffer;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7429,8 +7429,6 @@ Sigma_Exit:
|
|||
#endif
|
||||
cs.max_jerk[E_AXIS] = e;
|
||||
}
|
||||
if (cs.max_jerk[X_AXIS] > DEFAULT_XJERK) cs.max_jerk[X_AXIS] = DEFAULT_XJERK;
|
||||
if (cs.max_jerk[Y_AXIS] > DEFAULT_YJERK) cs.max_jerk[Y_AXIS] = DEFAULT_YJERK;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -9814,39 +9812,6 @@ void controllerFan()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEMP_STAT_LEDS
|
||||
static bool blue_led = false;
|
||||
static bool red_led = false;
|
||||
static uint32_t stat_update = 0;
|
||||
|
||||
void handle_status_leds(void) {
|
||||
float max_temp = 0.0;
|
||||
if(_millis() > stat_update) {
|
||||
stat_update += 500; // Update every 0.5s
|
||||
for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) {
|
||||
max_temp = max(max_temp, degHotend(cur_extruder));
|
||||
max_temp = max(max_temp, degTargetHotend(cur_extruder));
|
||||
}
|
||||
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
|
||||
max_temp = max(max_temp, degTargetBed());
|
||||
max_temp = max(max_temp, degBed());
|
||||
#endif
|
||||
if((max_temp > 55.0) && (red_led == false)) {
|
||||
digitalWrite(STAT_LED_RED, 1);
|
||||
digitalWrite(STAT_LED_BLUE, 0);
|
||||
red_led = true;
|
||||
blue_led = false;
|
||||
}
|
||||
if((max_temp < 54.0) && (blue_led == false)) {
|
||||
digitalWrite(STAT_LED_RED, 0);
|
||||
digitalWrite(STAT_LED_BLUE, 1);
|
||||
red_led = false;
|
||||
blue_led = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAFETYTIMER
|
||||
/**
|
||||
* @brief Turn off heating after safetytimer_inactive_time milliseconds of inactivity
|
||||
|
@ -10090,9 +10055,6 @@ if(0)
|
|||
WRITE(E0_ENABLE_PIN,oldstatus);
|
||||
}
|
||||
#endif
|
||||
#ifdef TEMP_STAT_LEDS
|
||||
handle_status_leds();
|
||||
#endif
|
||||
check_axes_activity();
|
||||
mmu_loop();
|
||||
|
||||
|
|
|
@ -241,9 +241,7 @@ static void lcd_detect_IRsensor();
|
|||
#endif //IR_SENSOR_ANALOG
|
||||
static void lcd_selftest_error(TestError error, const char *_error_1, const char *_error_2);
|
||||
static void lcd_colorprint_change();
|
||||
#ifdef SNMM
|
||||
static int get_ext_nr();
|
||||
#endif //SNMM
|
||||
|
||||
#if defined (SNMM) || defined(SNMM_V2)
|
||||
static void fil_load_menu();
|
||||
static void fil_unload_menu();
|
||||
|
@ -8814,6 +8812,22 @@ void menu_lcd_lcdupdate_func(void)
|
|||
#if (SDCARDDETECT > 0)
|
||||
if ((IS_SD_INSERTED != lcd_oldcardstatus))
|
||||
{
|
||||
if(menu_menu == lcd_sdcard_menu) {
|
||||
// If the user is either inside the submenus
|
||||
// 1. 'Print from SD' --> and SD card is removed
|
||||
// 2. 'No SD card' --> and SD card is inserted
|
||||
//
|
||||
// 1. 'Print from SD': We want to back out of this submenu
|
||||
// and instead show the submenu title 'No SD card'.
|
||||
//
|
||||
// 2. 'No SD card': When the user inserts the SD card we want
|
||||
// to back out of this submenu. Not only to show
|
||||
// 'Print from SD' submenu title but also because the user
|
||||
// will be prompted with another menu with the sorted list of files.
|
||||
// Without backing out of the menu, the list will appear empty and
|
||||
// The user will need to back out of two nested submenus.
|
||||
menu_back();
|
||||
}
|
||||
lcd_draw_update = 2;
|
||||
lcd_oldcardstatus = IS_SD_INSERTED;
|
||||
lcd_refresh(); // to maybe revive the LCD if static electricity killed it.
|
||||
|
@ -8832,8 +8846,6 @@ void menu_lcd_lcdupdate_func(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(menu_menu==lcd_sdcard_menu)
|
||||
menu_back();
|
||||
card.release();
|
||||
LCD_MESSAGERPGM(_i("Card removed"));////MSG_SD_REMOVED c=20
|
||||
}
|
||||
|
|
|
@ -167,15 +167,6 @@ void lcd_commands();
|
|||
extern bool bSettings; // flag (i.e. 'fake parameter') for 'lcd_hw_setup_menu()' function
|
||||
void lcd_hw_setup_menu(void); // NOT static due to using inside "util" module ("nozzle_diameter_check()")
|
||||
|
||||
|
||||
void change_extr(int extr);
|
||||
|
||||
#ifdef SNMM
|
||||
void extr_unload_all();
|
||||
void extr_unload_used();
|
||||
#endif //SNMM
|
||||
void extr_unload();
|
||||
|
||||
enum class FilamentAction : uint_least8_t
|
||||
{
|
||||
None, //!< 'none' state is used as flag for (filament) autoLoad (i.e. opposite for 'autoLoad' state)
|
||||
|
@ -223,8 +214,6 @@ void lcd_pinda_calibration_menu();
|
|||
void lcd_calibrate_pinda();
|
||||
void lcd_temp_calibration_set();
|
||||
|
||||
void display_loading();
|
||||
|
||||
#if (LANG_MODE != 0)
|
||||
void lcd_language();
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue