Support for debug builds:
A build version and repository is displayed on the welcome screen, D-codes, stack overflow check and stepper timer overflow check are enabled in the debug mode.
This commit is contained in:
parent
b5f8b1d97c
commit
330f1576fc
5 changed files with 49 additions and 26 deletions
|
@ -2,7 +2,6 @@
|
|||
#define CONFIGURATION_H
|
||||
|
||||
#include "boards.h"
|
||||
#include "Configuration_prusa.h"
|
||||
|
||||
#define STR_HELPER(x) #x
|
||||
#define STR(x) STR_HELPER(x)
|
||||
|
@ -10,7 +9,8 @@
|
|||
// Firmware version
|
||||
#define FW_VERSION "3.1.1-RC5"
|
||||
#define FW_COMMIT_NR 150
|
||||
#define FW_DEV_VERSION FW_VERSION_RC
|
||||
#define FW_DEV_VERSION FW_VERSION_DEBUG
|
||||
#define FW_REPOSITORY "Prusa3D/MK3"
|
||||
#define FW_VERSION_FULL FW_VERSION "-" STR(FW_COMMIT_NR)
|
||||
|
||||
#define FW_VERSION_DEBUG 5
|
||||
|
@ -20,6 +20,14 @@
|
|||
#define FW_VERSION_RC 1
|
||||
#define FW_VERSION_GOLD 0
|
||||
|
||||
#if FW_DEV_VERSION == FW_VERSION_DEBUG
|
||||
#define DEBUG_BUILD
|
||||
#else
|
||||
#undef DEBUG_BUILD
|
||||
#endif
|
||||
|
||||
#include "Configuration_prusa.h"
|
||||
|
||||
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
||||
#define FW_PRUSA3D_MAGIC_LEN 10
|
||||
// The total size of the EEPROM is
|
||||
|
|
|
@ -105,10 +105,9 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#define MINTEMP_MINAMBIENT_RAW 978
|
||||
|
||||
|
||||
//DEBUG
|
||||
#ifdef DEBUG_BUILD
|
||||
//#define _NO_ASM
|
||||
#define DEBUG_DCODES //D codes
|
||||
#if 1
|
||||
#define DEBUG_STACK_MONITOR //Stack monitor in stepper ISR
|
||||
//#define DEBUG_FSENSOR_LOG //Reports fsensor status to serial
|
||||
//#define DEBUG_CRASHDET_COUNTERS //Display crash-detection counters on LCD
|
||||
|
@ -132,8 +131,9 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
//#define DEBUG_DISABLE_FANCHECK //disable fan check (no ISR INT7, check disabled)
|
||||
//#define DEBUG_DISABLE_FSENSORCHECK //disable fsensor check (no ISR INT7, check disabled)
|
||||
#define DEBUG_DUMP_TO_2ND_SERIAL //dump received characters to 2nd serial line
|
||||
//#define DEBUG_STEPPER_TIMER_MISSED // Stop on stepper timer overflow, beep and display a message.
|
||||
#endif
|
||||
#define DEBUG_STEPPER_TIMER_MISSED // Stop on stepper timer overflow, beep and display a message.
|
||||
#define PLANNER_DIAGNOSTICS // Show the planner queue status on printer display.
|
||||
#endif /* DEBUG_BUILD */
|
||||
|
||||
|
||||
/*------------------------------------
|
||||
|
|
|
@ -892,7 +892,19 @@ void show_fw_version_warnings() {
|
|||
case(FW_VERSION_ALPHA): lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_ALPHA); break;
|
||||
case(FW_VERSION_BETA): lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_BETA); break;
|
||||
case(FW_VERSION_RC): lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_RC); break;
|
||||
case(FW_VERSION_DEBUG): lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_DEBUG); break;
|
||||
case(FW_VERSION_DEBUG):
|
||||
#if 1
|
||||
lcd_update_enable(false);
|
||||
lcd_implementation_clear();
|
||||
lcd_print_at_PGM(0, 0, PSTR("Debbugging build !!!"));
|
||||
lcd_print_at_PGM(0, 1, PSTR("May destroy printer!"));
|
||||
lcd_print_at_PGM(0, 2, PSTR("ver ")); lcd_printPGM(PSTR(FW_VERSION_FULL));
|
||||
lcd_print_at_PGM(0, 3, PSTR(FW_REPOSITORY));
|
||||
lcd_wait_for_click();
|
||||
#else
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_DEBUG);
|
||||
#endif
|
||||
break;
|
||||
default: lcd_show_fullscreen_message_and_wait_P(MSG_FW_VERSION_UNKNOWN); break;
|
||||
}
|
||||
lcd_update_enable(true);
|
||||
|
|
|
@ -1675,6 +1675,9 @@ static void lcd_support_menu()
|
|||
|
||||
MENU_ITEM(back, PSTR("Firmware:"), lcd_main_menu);
|
||||
MENU_ITEM(back, PSTR(" " FW_VERSION_FULL), lcd_main_menu);
|
||||
#if (FW_DEV_VERSION != FW_VERSION_GOLD) && (FW_DEV_VERSION != FW_VERSION_RC)
|
||||
MENU_ITEM(back, PSTR(" repo " FW_REPOSITORY), lcd_main_menu);
|
||||
#endif
|
||||
// Ideally this block would be optimized out by the compiler.
|
||||
/* const uint8_t fw_string_len = strlen_P(FW_VERSION_STR_P());
|
||||
if (fw_string_len < 6) {
|
||||
|
|
|
@ -729,20 +729,7 @@ static void lcd_implementation_status_screen()
|
|||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
lcd_printPGM(PSTR(" "));
|
||||
|
||||
#if 1
|
||||
//Print Feedrate
|
||||
lcd.setCursor(LCD_WIDTH - 8-2, 1);
|
||||
lcd_printPGM(PSTR(" "));
|
||||
lcd.print(LCD_STR_FEEDRATE[0]);
|
||||
lcd.print(itostr3(feedmultiply));
|
||||
lcd_printPGM(PSTR("% "));
|
||||
|
||||
//lcd.setCursor(8, 0);
|
||||
//lcd.print(itostr3(fan_speed[0]));
|
||||
//lcd.setCursor(8, 1);
|
||||
//lcd.print(itostr3(fan_speed[1]));
|
||||
|
||||
#else
|
||||
#ifdef PLANNER_DIAGNOSTICS
|
||||
//Print Feedrate
|
||||
lcd.setCursor(LCD_WIDTH - 8-2, 1);
|
||||
lcd.print(LCD_STR_FEEDRATE[0]);
|
||||
|
@ -751,15 +738,23 @@ static void lcd_implementation_status_screen()
|
|||
{
|
||||
uint8_t queue = planner_queue_min();
|
||||
if (queue < (BLOCK_BUFFER_SIZE >> 1)) {
|
||||
lcd.print('!');
|
||||
lcd.write('!');
|
||||
} else {
|
||||
lcd.print((char)(queue / 10) + '0');
|
||||
lcd.write((char)(queue / 10) + '0');
|
||||
queue %= 10;
|
||||
}
|
||||
lcd.print((char)queue + '0');
|
||||
lcd.write((char)queue + '0');
|
||||
planner_queue_min_reset();
|
||||
}
|
||||
#endif
|
||||
#else /* PLANNER_DIAGNOSTICS */
|
||||
//Print Feedrate
|
||||
lcd.setCursor(LCD_WIDTH - 8-2, 1);
|
||||
lcd_printPGM(PSTR(" "));
|
||||
lcd.print(LCD_STR_FEEDRATE[0]);
|
||||
lcd.print(itostr3(feedmultiply));
|
||||
lcd_printPGM(PSTR("% "));
|
||||
#endif /* PLANNER_DIAGNOSTICS */
|
||||
|
||||
bool print_sd_status = true;
|
||||
|
||||
#ifdef PINDA_THERMISTOR
|
||||
|
@ -872,7 +867,12 @@ if (print_sd_status)
|
|||
}
|
||||
|
||||
// If printing from SD, show what we are printing
|
||||
if ((IS_SD_PRINTING) && !custom_message)
|
||||
if ((IS_SD_PRINTING) && !custom_message
|
||||
#ifdef DEBUG_BUILD
|
||||
&& lcd_status_message[0] == 0
|
||||
#endif /* DEBUG_BUILD */
|
||||
)
|
||||
|
||||
{
|
||||
if(strlen(card.longFilename) > LCD_WIDTH)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue