[WIP] Printer information menu#4175
Conversation
|
This is a good idea. |
|
I just find the board name an overkill, maybe it would suffice to show the board #define ? It would be less one additional list to maintain. Or if would like to keep the pretty name, maybe the name #define would go inside each pin file having a default #define of "unknown" ? |
|
I like the idea of having the board name visible, it is possible someone has two similar machines using different boards. The way I originally handled the #ifdef mess was a bit of a hack - your suggestion of using pins_*.h has cleaned it up significantly. @lintz originally mentioned temperature sensors and power supply in #4152 The print job info is on my list, but will need a getter method adding to the PrintCounter class. Any objections? |
Marlin/pins_STB_11.h
Outdated
|
|
||
| #ifdef BOARD_NAME | ||
| #undef BOARD_NAME | ||
| #endif |
There was a problem hiding this comment.
You can just use #undef BOARD_NAME and remove the #ifdef block.
|
It looks like you need to do a |
Actually, it's not pretty, but there is a trick you can do by using #define THERMISTOR_ID TEMP_SENSOR_0
#include "get_thermistor_name.h"
STATIC_ITEM(MSG_THERMISTOR " 0: " THERMISTOR_NAME);
#if TEMP_SENSOR_1 != 0
#undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_1
#include "get_thermistor_name.h"
STATIC_ITEM(MSG_THERMISTOR " 1: " THERMISTOR_NAME);
#endif
#if TEMP_SENSOR_2 != 0
#undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_2
#include "get_thermistor_name.h"
STATIC_ITEM(MSG_THERMISTOR " 2: " THERMISTOR_NAME);
#endif
#if TEMP_SENSOR_3 != 0
#undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_3
#include "get_thermistor_name.h"
STATIC_ITEM(MSG_THERMISTOR " 3: " THERMISTOR_NAME);
#endifThen your #undef THERMISTOR_NAME
#if THERMISTOR_ID == -3
#define THERMISTOR_NAME "MAX31855"
#elif THERMISTOR_ID == -2
#define THERMISTOR_NAME "MAX6675"
#elif THERMISTOR_ID == -1
#define THERMISTOR_NAME "AD595"
#elif THERMISTOR_ID == 1
#define THERMISTOR_NAME "100k"
. . .
#endif |
|
@birkett Just as examples I took these. Of course printing the names rather then de defines would make the menu look nicer but not needed for me. O and thanks for taking up the task this fast :) |
Marlin/printcounter.h
Outdated
There was a problem hiding this comment.
You don't have to use inline here, as you're defining the body of the method inside the header the compiler with automatically inline this for you.
There was a problem hiding this comment.
Changed on next push.
Marlin/ultralcd.cpp
Outdated
There was a problem hiding this comment.
2 times static void lcd_info_menu(); ???
There was a problem hiding this comment.
I cocked up the merge, fixed on next push.
|
@thinkyhead I figured that would be the way around it, but was unsure if you had any plans for the future. |
4d5f003 to
66ed8b3
Compare
Marlin/ultralcd.cpp
Outdated
| #endif //SDSUPPORT | ||
|
|
||
| #if ENABLED(LCD_INFO_MENU) | ||
| #ifdef PRINTCOUNTER |
| STATIC_ITEM(STRING_DISTRIBUTION_DATE ); // YYYY-MM-DD HH:MM | ||
| STATIC_ITEM(MACHINE_NAME ); // My3DPrinter | ||
| STATIC_ITEM(WEBSITE_URL ); // www.my3dprinter.com | ||
| STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2 |
There was a problem hiding this comment.
Neat, but no. Don't add extra spaces within the function call.
There was a problem hiding this comment.
Just the () thing, you can leave the comments aligned.
|
@birkett This is getting pretty ugly, and active PRs really need to be kept up to date, otherwise they are difficult to work on, we have to make our own copies of your branch, and then we might have to throw away your PR and make our own. It ends up being a lot of extra work for everyone. Unfortunately, we can only add PRs to your branch, we cannot rebase it without making our own copies. Do you know how to use git to rebase and squash commits? |
|
I'm familiar with rebase / squash. I planned on squashing down to one or two commits once it is "complete". |
|
You can do whatever you want with your branch and commits, then use …and we can adapt to your branch as it changes. |
ef28c7d to
9cd3936
Compare
Includes: *firmware version / branch / date. *extruder count *board information (name, serial details, power supply type) *thermistors (names, min/max temperatures) *printer statistics (PRINTCOUNTER details) Thanks to @thinkyhead for contributions.
|
Your branch is looking a lot cleaner, thanks! Meanwhile, your concept of |
|
Thanks @thinkyhead - are there any other comments you have, or changes you would like made? |
|
We can always extend it later. It's great to just have the basics ready to go. |
Patch for STATIC_ITEM_VAR ability
|
As this is disabled by default, it's no problem to merge this shortly. It needs a tweak to scroll properly, but I will work on that and patch |
cleanup: Remove unused `LcdCommands` state `LoadFilament`
Adds an "About Printer" menu entry in the main menu, to show basic information about the printer and firmware configuration.
Currently untested, and incomplete.
TODO:
Add string translations for languages other than English