Commit b642a8f9 authored by Simone Primarosa's avatar Simone Primarosa

Update 4.1.5 dev

Added statistics menu in lcd
parent 2b3e1992
### Version 4.1.5
* Added statistics menu
* Added an overall configuration file
* Added M70 gcode for calibrate AC721 current sensor
* Added documentation for calibrate AC721 current sensor
......
......@@ -35,6 +35,8 @@
#define MSG_MBL_6 " BED leveled! "
#define MSG_SET_HOME_OFFSETS "Set home offsets"
#define MSG_SET_ORIGIN "Set origin"
#define MSG_ONFOR "On x:"
#define MSG_PWRCONSUMED "P.er:"
#define MSG_PREHEAT_PLA "Preheat PLA"
#define MSG_PREHEAT_PLA_ALL "Preheat PLA All"
#define MSG_PREHEAT_PLA_BEDONLY "Preheat PLA Bed"
......@@ -68,6 +70,7 @@
#define MSG_FAN_SPEED "Fan speed"
#define MSG_FLOW "Flow"
#define MSG_CONTROL "Control"
#define MSG_STATS "Statistics"
#define MSG_FIX_LOSE_STEPS "Fix axis steps"
#define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX LCD_STR_THERMOMETER " Max"
......
......@@ -31,6 +31,8 @@
#define MSG_MBL_6 " Piatto livellato! "
#define MSG_SET_HOME_OFFSETS "Setta offset home"
#define MSG_SET_ORIGIN "Imposta Origine"
#define MSG_ONFOR "On x:"
#define MSG_PWRCONSUMED "P.za:"
#define MSG_PREHEAT_PLA "Preriscalda PLA"
#define MSG_PREHEAT_PLA_ALL "Prer. PLA Tutto"
#define MSG_PREHEAT_PLA_BEDONLY "Prer. PLA Piatto"
......@@ -64,6 +66,7 @@
#define MSG_FAN_SPEED "Ventola"
#define MSG_FLOW "Flusso"
#define MSG_CONTROL "Controllo"
#define MSG_STATS "Statistiche"
#define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
......
......@@ -278,6 +278,10 @@
#error HEATER_0_PIN not defined for this board
#endif
#endif
#if DISABLED(SDSUPPORT) && ENABLED(SD_SETTINGS)
#error You have to enable SDSUPPORT to use SD_SETTINGS
#endif
/**
* Warnings for old configurations
......
......@@ -67,6 +67,7 @@ static void lcd_status_screen();
static void lcd_prepare_temperature_menu();
static void lcd_move_menu();
static void lcd_control_menu();
static void lcd_stats_menu();
static void lcd_control_temperature_menu();
static void lcd_control_temperature_preheat_pla_settings_menu();
static void lcd_control_temperature_preheat_abs_settings_menu();
......@@ -448,7 +449,9 @@ static void lcd_main_menu() {
#endif // DELTA
}
MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu);
MENU_ITEM(submenu, MSG_STATS, lcd_stats_menu);
#if ENABLED(SDSUPPORT)
if (card.cardOK) {
if (card.isFileOpen()) {
......@@ -1045,6 +1048,22 @@ static void lcd_control_menu() {
END_MENU();
}
/**
*
* "Statistics" submenu
*
*/
static void lcd_stats_menu() {
char row[30];
int day = printer_usage_seconds / 60 / 60 / 24, hours = (printer_usage_seconds / 60 / 60) % 24, minutes = (printer_usage_seconds / 60) % 60;
sprintf_P(row, PSTR(MSG_ONFOR " %id %ih %im"), day, hours, minutes);
LCD_Printpos(0, 0); lcd_print(row);
sprintf_P(row, PSTR(MSG_PWRCONSUMED " %iWh"), power_consumption_hour);
LCD_Printpos(0, 1); lcd_print(row);
if (LCD_CLICKED) lcd_goto_menu(lcd_main_menu);
}
/**
*
* "Temperature" submenu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment