Skip to content

Commit c951208

Browse files
authored
Merge pull request #181 from th3dstudio/2.0.x
2.0.x
2 parents 891deef + 003eba4 commit c951208

File tree

11 files changed

+61
-5
lines changed

11 files changed

+61
-5
lines changed

Board_Configs/TH3D_EZBoardLite/Firmware/Marlin/Configuration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#pragma once
66
#define CONFIGURATION_H_VERSION 02010200
77

8+
#define UNIFIED_VERSION "UF 2.83"
9+
#define STRING_DISTRIBUTION_DATE "2023-12-14"
10+
811
//#@CONFIGURATION_START_FLAG
912

1013
//===========================================================================

Board_Configs/TH3D_EZBoardLite_DIY/Firmware/Marlin/Configuration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#pragma once
88
#define CONFIGURATION_H_VERSION 02010200
99

10+
#define UNIFIED_VERSION "UF 2.83"
11+
#define STRING_DISTRIBUTION_DATE "2023-12-14"
12+
1013
//#@CONFIGURATION_START_FLAG
1114

1215
//===========================================================================

Board_Configs/TH3D_EZBoardV2/Firmware/Marlin/Configuration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#pragma once
66
#define CONFIGURATION_H_VERSION 02010200
77

8+
#define UNIFIED_VERSION "UF 2.83"
9+
#define STRING_DISTRIBUTION_DATE "2023-12-14"
10+
811
//#@CONFIGURATION_START_FLAG
912

1013
//===========================================================================

Board_Configs/TH3D_EZBoardV2_DIY/Firmware/Marlin/Configuration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#pragma once
88
#define CONFIGURATION_H_VERSION 02010200
99

10+
#define UNIFIED_VERSION "UF 2.83"
11+
#define STRING_DISTRIBUTION_DATE "2023-12-14"
12+
1013
//#@CONFIGURATION_START_FLAG
1114

1215
//===========================================================================
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The firmware version is located in the Marlin\Configuration_backend.h file at the top of the file
1+
The firmware version is located at the top of each Configuration.h file.

Firmware/Marlin/Configuration_backend.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
//======================= DO NOT MODIFY THIS FILE ===========================
77
//===========================================================================
88

9-
#define UNIFIED_VERSION "TH3D UFW 2.82"
10-
#define STRING_DISTRIBUTION_DATE "12-12-2023"
9+
// Version and Date information is now in the Configuration.h files at the top.
1110

1211
/**
1312
* ABL Probe Settings
@@ -16,6 +15,10 @@
1615
#if ENABLED(CUSTOM_PROBE)
1716
#define ABL_ENABLE
1817
#endif
18+
#if ENABLED(ENDER5_S1_OEM)
19+
#define ABL_ENABLE
20+
#define NOZZLE_TO_PROBE_OFFSET { -35, -2, 0 }
21+
#endif
1922
#if ENABLED(KP3S_PRO_OEM_MOUNT)
2023
#define ABL_ENABLE
2124
#define NOZZLE_TO_PROBE_OFFSET { -54, -9, 0 }
@@ -312,8 +315,8 @@
312315
#define Z_MIN_PROBE_ENDSTOP_INVERTING false
313316
#undef Z_MIN_ENDSTOP_INVERTING
314317
#define Z_MIN_ENDSTOP_INVERTING false
315-
#elif (ENABLED(CR10S_PRO_STOCK_ABL) && ENABLED(CR10S_PRO)) || ANY(ENDER3_S1, ENDER3_S1_PRO, ENDER3_S1_PLUS) || (ANY(SOVOL_SV06, SOVOL_SV06_PLUS) && DISABLED(SV06_EZABL_INSTALLED))
316-
//Ender 3 S1 J713 header for Z Endstop is reverse logic via hardware for some reason. Need to invert the EZABL logic for it here.
318+
#elif (ENABLED(CR10S_PRO_STOCK_ABL) && ENABLED(CR10S_PRO)) || ANY(ENDER3_S1, ENDER3_S1_PRO, ENDER3_S1_PLUS, ENDER5_S1) || (ANY(SOVOL_SV06, SOVOL_SV06_PLUS) && DISABLED(SV06_EZABL_INSTALLED))
319+
//Ender 3 S1 & 5 S1 J713 header for Z Endstop is reverse logic via hardware for some reason. Need to invert the EZABL logic for it here.
317320
#undef Z_MIN_PROBE_ENDSTOP_INVERTING
318321
#define Z_MIN_PROBE_ENDSTOP_INVERTING false
319322
#undef Z_MIN_ENDSTOP_INVERTING
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import os
2+
import re
3+
from datetime import datetime
4+
5+
def update_version_info(file_path, new_version, new_build_date):
6+
with open(file_path, 'r') as file:
7+
content = file.read()
8+
9+
# Update UNIFIED_VERSION
10+
content = re.sub(r'#define UNIFIED_VERSION "(.*?)"', f'#define UNIFIED_VERSION "UF {new_version}"', content)
11+
12+
# Update STRING_DISTRIBUTION_DATE
13+
content = re.sub(r'#define STRING_DISTRIBUTION_DATE "(.*?)"', f'#define STRING_DISTRIBUTION_DATE "{new_build_date}"', content)
14+
15+
with open(file_path, 'w') as file:
16+
file.write(content)
17+
18+
def update_version_in_folders(root_directories, new_version, new_build_date):
19+
for root_directory in root_directories:
20+
# Iterate through files in the directory
21+
for root, dirs, files in os.walk(root_directory):
22+
for filename in files:
23+
if filename.endswith("Configuration.h"):
24+
file_path = os.path.join(root, filename)
25+
update_version_info(file_path, new_version, new_build_date)
26+
print(f"Updated {file_path}")
27+
28+
def main():
29+
new_version = input("Enter the new version number: ")
30+
new_build_date = datetime.now().strftime("%Y-%m-%d")
31+
32+
# Specify the root directories containing Configuration.h files
33+
root_directories = [
34+
r'D:\Work\GitHub\UnifiedFirmware\Board_Configs',
35+
r'D:\Work\GitHub\UnifiedPaidConfigs\Board_Configs'
36+
]
37+
38+
update_version_in_folders(root_directories, new_version, new_build_date)
39+
40+
if __name__ == "__main__":
41+
main()
86.8 KB
Binary file not shown.
612 KB
Loading

0 commit comments

Comments
 (0)