Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printer information menu #4188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ script:
- opt_set MOTHERBOARD BOARD_MINIRAMBO
- build_marlin
#
# Enable FILAMENTCHANGEENABLE
# Test FILAMENTCHANGEENABLE and LCD_INFO_MENU
#
- restore_configs
- opt_enable ULTIMAKERCONTROLLER
- opt_enable_adv FILAMENTCHANGEENABLE
- opt_enable_adv FILAMENTCHANGEENABLE LCD_INFO_MENU
- build_marlin
#
# Enable filament sensor
Expand Down
3 changes: 3 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
44 changes: 15 additions & 29 deletions Marlin/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,35 +56,21 @@
* Marlin release, version and default string
*/
#ifndef SHORT_BUILD_VERSION
#error "SHORT_BUILD_VERSION Information must be specified"
#endif

#ifndef DETAILED_BUILD_VERSION
#error "BUILD_VERSION Information must be specified"
#endif

#ifndef STRING_DISTRIBUTION_DATE
#error "STRING_DISTRIBUTION_DATE Information must be specified"
#endif

#ifndef PROTOCOL_VERSION
#error "PROTOCOL_VERSION Information must be specified"
#endif

#ifndef MACHINE_NAME
#error "MACHINE_NAME Information must be specified"
#endif

#ifndef SOURCE_CODE_URL
#error "SOURCE_CODE_URL Information must be specified"
#endif

#ifndef DEFAULT_MACHINE_UUID
#error "DEFAULT_MACHINE_UUID Information must be specified"
#endif

#ifndef WEBSITE_URL
#error "WEBSITE_URL Information must be specified"
#error "SHORT_BUILD_VERSION must be specified."
#elif !defined(DETAILED_BUILD_VERSION)
#error "BUILD_VERSION must be specified."
#elif !defined(STRING_DISTRIBUTION_DATE)
#error "STRING_DISTRIBUTION_DATE must be specified."
#elif !defined(PROTOCOL_VERSION)
#error "PROTOCOL_VERSION must be specified."
#elif !defined(MACHINE_NAME)
#error "MACHINE_NAME must be specified."
#elif !defined(SOURCE_CODE_URL)
#error "SOURCE_CODE_URL must be specified."
#elif !defined(DEFAULT_MACHINE_UUID)
#error "DEFAULT_MACHINE_UUID must be specified."
#elif !defined(WEBSITE_URL)
#error "WEBSITE_URL must be specified."
#endif

/**
Expand Down
24 changes: 24 additions & 0 deletions Marlin/dogm_lcd_implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,30 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
u8g.setPrintPos((START_ROW) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
}

#if ENABLED(LCD_INFO_MENU)

static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, const char* valstr=NULL, bool center=false) {
char c;
int8_t n = LCD_WIDTH;
u8g.setPrintPos(0, (row + 1) * (DOG_CHAR_HEIGHT));
u8g.setColorIndex(1); // normal text
if (center) {
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
while (--pad >= 0) { lcd_print(' '); n--; }
}
while (c = pgm_read_byte(pstr)) {
n -= lcd_print(c);
pstr++;
}
if (valstr) {
lcd_print(valstr);
n -= lcd_strlen(valstr);
}
while (n-- > 0) lcd_print(' ');
}

#endif // LCD_INFO_MENU

static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
UNUSED(pstr);
UNUSED(pre_char);
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/Cartesio/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/Felix/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/Hephestos/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/Hephestos_2/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/K8200/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/RigidBot/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/SCARA/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/TAZ4/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/WITBOX/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
3 changes: 3 additions & 0 deletions Marlin/example_configurations/makibox/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@

// @section lcd

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
Expand Down
42 changes: 42 additions & 0 deletions Marlin/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,5 +520,47 @@
#ifndef MSG_DELTA_CALIBRATE_CENTER
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif
#ifndef MSG_INFO_MENU
#define MSG_INFO_MENU "About Printer"
#endif
#ifndef MSG_INFO_PRINTER_MENU
#define MSG_INFO_PRINTER_MENU "Printer Info"
#endif
#ifndef MSG_INFO_STATS_MENU
#define MSG_INFO_STATS_MENU "Printer Stats"
#endif
#ifndef MSG_INFO_BOARD_MENU
#define MSG_INFO_BOARD_MENU "Board Info"
#endif
#ifndef MSG_INFO_THERMISTOR_MENU
#define MSG_INFO_THERMISTOR_MENU "Thermistors"
#endif
#ifndef MSG_INFO_EXTRUDERS
#define MSG_INFO_EXTRUDERS "Extruders"
#endif
#ifndef MSG_INFO_BAUDRATE
#define MSG_INFO_BAUDRATE "Baud"
#endif
#ifndef MSG_INFO_PROTOCOL
#define MSG_INFO_PROTOCOL "Protocol"
#endif
#ifndef MSG_INFO_TOTAL_PRINTS
#define MSG_INFO_TOTAL_PRINTS "Total Prints"
#endif
#ifndef MSG_INFO_FINISHED_PRINTS
#define MSG_INFO_FINISHED_PRINTS "Finished Prints"
#endif
#ifndef MSG_INFO_PRINT_TIME
#define MSG_INFO_PRINT_TIME "Total Print Time"
#endif
#ifndef MSG_INFO_MIN_TEMP
#define MSG_INFO_MIN_TEMP "Min Temp"
#endif
#ifndef MSG_INFO_MAX_TEMP
#define MSG_INFO_MAX_TEMP "Max Temp"
#endif
#ifndef MSG_INFO_PSU
#define MSG_INFO_PSU "Power Supply"
#endif

#endif // LANGUAGE_EN_H
15 changes: 12 additions & 3 deletions Marlin/pins_3DRAG.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@
* 3DRAG (and K8200) Arduino Mega with RAMPS v1.4 pin assignments
*/

#include "pins_RAMPS_14.h"
#ifndef BOARD_NAME
#define BOARD_NAME "3Drag"
#endif

#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "3Drag"
#endif

#define DEFAULT_MACHINE_NAME "3Drag"
#define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
#ifndef DEFAULT_SOURCE_CODE_URL
#define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
#endif

#include "pins_RAMPS_14.h"

#undef Z_ENABLE_PIN
#define Z_ENABLE_PIN 63
Expand Down
1 change: 1 addition & 0 deletions Marlin/pins_5DPRINT.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#endif

#define DEFAULT_MACHINE_NAME "Makibox"
#define BOARD_NAME "5DPrint D8"

#define LARGE_FLASH true

Expand Down
3 changes: 2 additions & 1 deletion Marlin/pins_99.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
/**
* Board 99 pin assignments
*/

#define BOARD_NAME "99 Unknown"

#define X_STEP_PIN 2
#define X_DIR_PIN 3
#define X_ENABLE_PIN -1
Expand Down
2 changes: 2 additions & 0 deletions Marlin/pins_A4JP.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
#endif

#define BOARD_NAME "AJ4P"

// Servo support
#define SERVO0_PIN 22 // Motor header MX1
#define SERVO1_PIN 23 // Motor header MX2
Expand Down
3 changes: 2 additions & 1 deletion Marlin/pins_AZTEEG_X1.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Azteeg X1 pin assignments
*/

#define SANGUINOLOLU_V_1_2
#define BOARD_NAME "Azteeg X1"

#define SANGUINOLOLU_V_1_2
#include "pins_SANGUINOLOLU_11.h"
2 changes: 2 additions & 0 deletions Marlin/pins_AZTEEG_X3.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
*/

#define BOARD_NAME "Azteeg X3"

#include "pins_RAMPS_14_EFB.h"

#if ENABLED(VIKI2) || ENABLED(miniVIKI)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/pins_AZTEEG_X3_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* AZTEEG_X3_PRO (Arduino Mega) pin assignments
*/

#define BOARD_NAME "Azteeg X3 Pro"

#include "pins_RAMPS_14.h"

#undef FAN_PIN
Expand Down
2 changes: 2 additions & 0 deletions Marlin/pins_BAM_DICE_DUE.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* BAM&DICE Due (Arduino Mega) pin assignments
*/

#define BOARD_NAME "2PrintBeta Due"

#include "pins_RAMPS_14_EFB.h"

#undef TEMP_0_PIN
Expand Down
Loading