Przeglądaj źródła

Supply a VERSION in a short form for displays

The long descriptor will still be available in M115
Richard Wackerbarth 8 lat temu
rodzic
commit
b227d8c128

+ 8
- 3
LinuxAddons/bin/generate_version_header_for_marlin Wyświetl plik

@@ -21,11 +21,16 @@ echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE"
21 21
   else
22 22
     BRANCH=" $BRANCH"
23 23
   fi
24
-  VERSION=`git describe --tags --first-parent 2>/dev/null` 
24
+  VERSION=`git describe --tags --first-parent 2>/dev/null`
25 25
   if [ "x$VERSION" != "x" ] ; then
26
-    echo "#define BUILD_VERSION \"$VERSION\"" | sed "s/-/$BRANCH-/" >>"$OUTFILE"
26
+    echo "#define SHORT_BUILD_VERSION \"$VERSION\"" | sed "s/-.*/$BRANCH\"/" >>"$OUTFILE"
27
+    echo "#define DETAILED_BUILD_VERSION \"$VERSION\"" | sed "s/-/$BRANCH-/" >>"$OUTFILE"
28
+  else
29
+    VERSION=`git describe --tags --first-parent --always 2>/dev/null`
30
+    echo "#define SHORT_BUILD_VERSION \"$BRANCH\"" >>"$OUTFILE"
31
+    echo "#define DETAILED_BUILD_VERSION \"${BRANCH}-$VERSION\"" >>"$OUTFILE"
27 32
   fi
28
-  URL=`git config --local --get remote.origin.url | sed "sx.*github.com:xhttps://github.com/x" | sed "sx\.gitx/x"`
33
+  URL=`git config --local --get remote.origin.url | sed "sx.*github.com.xhttps://github.com/x" | sed "sx\.gitx/x"`
29 34
   if [ "x$URL" != "x" ] ; then
30 35
     echo "#define SOURCE_CODE_URL  \""$URL"\"" >>"$OUTFILE"
31 36
     echo "// Deprecated URL definition" >>"$OUTFILE"

+ 1
- 1
Marlin/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/Marlin_main.cpp Wyświetl plik

@@ -638,7 +638,7 @@ void setup() {
638 638
   MCUSR = 0;
639 639
 
640 640
   SERIAL_ECHOPGM(MSG_MARLIN);
641
-  SERIAL_ECHOLNPGM(" " BUILD_VERSION);
641
+  SERIAL_ECHOLNPGM(" " SHORT_BUILD_VERSION);
642 642
 
643 643
   #ifdef STRING_DISTRIBUTION_DATE
644 644
     #ifdef STRING_CONFIG_H_AUTHOR

+ 1
- 1
Marlin/configurator/config/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 3
- 3
Marlin/configurator/config/language.h Wyświetl plik

@@ -75,8 +75,8 @@
75 75
   #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
76 76
 #endif
77 77
 
78
-#ifndef BUILD_VERSION
79
-  #define BUILD_VERSION "V1; Sprinter/grbl mashup for gen6"
78
+#ifndef DETAILED_BUILD_VERSION
79
+  #error BUILD_VERSION Information must be specified
80 80
 #endif
81 81
 
82 82
 #ifndef MACHINE_UUID
@@ -120,7 +120,7 @@
120 120
 #define MSG_INVALID_EXTRUDER                "Invalid extruder"
121 121
 #define MSG_INVALID_SOLENOID                "Invalid solenoid"
122 122
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
123
-#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
123
+#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
124 124
 #define MSG_COUNT_X                         " Count X: "
125 125
 #define MSG_ERR_KILLED                      "Printer halted. kill() called!"
126 126
 #define MSG_ERR_STOPPED                     "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/Felix/Configuration_DUAL.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h Wyświetl plik

@@ -54,7 +54,7 @@ Here are some standard links for getting your machine calibrated:
54 54
 // build by the user have been successfully uploaded into firmware.
55 55
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
56 56
 #define SHOW_BOOTSCREEN
57
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
57
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
58 58
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
59 59
 
60 60
 // @section machine

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h Wyświetl plik

@@ -74,7 +74,7 @@ Here are some standard links for getting your machine calibrated:
74 74
 // build by the user have been successfully uploaded into firmware.
75 75
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
76 76
 #define SHOW_BOOTSCREEN
77
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
77
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
78 78
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
79 79
 
80 80
 // @section machine

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/delta/biv2.5/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h Wyświetl plik

@@ -53,7 +53,7 @@ Here are some standard links for getting your machine calibrated:
53 53
 // build by the user have been successfully uploaded into firmware.
54 54
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
55 55
 #define SHOW_BOOTSCREEN
56
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
56
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
57 57
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
58 58
 
59 59
 // @section machine

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h Wyświetl plik

@@ -49,7 +49,7 @@ Here are some standard links for getting your machine calibrated:
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51 51
 #define SHOW_BOOTSCREEN
52
-#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
53 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
54 54
 
55 55
 // @section machine

+ 3
- 3
Marlin/language.h Wyświetl plik

@@ -75,8 +75,8 @@
75 75
   #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
76 76
 #endif
77 77
 
78
-#ifndef BUILD_VERSION
79
-  #define BUILD_VERSION "V1; Sprinter/grbl mashup for gen6"
78
+#ifndef DETAILED_BUILD_VERSION
79
+  #error BUILD_VERSION Information must be specified
80 80
 #endif
81 81
 
82 82
 #ifndef MACHINE_UUID
@@ -120,7 +120,7 @@
120 120
 #define MSG_INVALID_EXTRUDER                "Invalid extruder"
121 121
 #define MSG_INVALID_SOLENOID                "Invalid solenoid"
122 122
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
123
-#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
123
+#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
124 124
 #define MSG_COUNT_X                         " Count X: "
125 125
 #define MSG_ERR_KILLED                      "Printer halted. kill() called!"
126 126
 #define MSG_ERR_STOPPED                     "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"

Ładowanie…
Anuluj
Zapisz