Optimize LCD, Wifi, etc. libraries (#18730)
This commit is contained in:
		| @@ -20,21 +20,24 @@ def load_config(): | ||||
| 	config.read("platformio.ini") | ||||
| 	items = config.items('features') | ||||
| 	for key in items: | ||||
| 		deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n') | ||||
| 		if not key[0].upper() in FEATURE_DEPENDENCIES: | ||||
| 			FEATURE_DEPENDENCIES[key[0].upper()] = { | ||||
| 		ukey = key[0].upper() | ||||
| 		if not ukey in FEATURE_DEPENDENCIES: | ||||
| 			FEATURE_DEPENDENCIES[ukey] = { | ||||
| 				'lib_deps': [] | ||||
| 			} | ||||
| 		deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n') | ||||
| 		for dep in deps: | ||||
| 			parts = dep.split('=') | ||||
| 			name = parts.pop(0) | ||||
| 			rest = '='.join(parts) | ||||
| 			if name == 'extra_scripts': | ||||
| 				FEATURE_DEPENDENCIES[key[0].upper()]['extra_scripts'] = rest | ||||
| 				FEATURE_DEPENDENCIES[ukey]['extra_scripts'] = rest | ||||
| 			elif name == 'src_filter': | ||||
| 				FEATURE_DEPENDENCIES[key[0].upper()]['src_filter'] = rest | ||||
| 				FEATURE_DEPENDENCIES[ukey]['src_filter'] = rest | ||||
| 			elif name == 'lib_ignore': | ||||
| 				FEATURE_DEPENDENCIES[ukey]['lib_ignore'] = rest | ||||
| 			else: | ||||
| 				FEATURE_DEPENDENCIES[key[0].upper()]['lib_deps'] += [dep] | ||||
| 				FEATURE_DEPENDENCIES[ukey]['lib_deps'] += [dep] | ||||
|  | ||||
| def get_all_known_libs(): | ||||
| 	known_libs = [] | ||||
| @@ -126,7 +129,7 @@ def search_compiler(): | ||||
| 		# the first path have the compiler | ||||
| 		for path in env['ENV']['PATH'].split(';'): | ||||
| 			if not re.search(r'platformio\\packages.*\\bin', path): | ||||
| 				continue			 | ||||
| 				continue | ||||
| 			#print(path) | ||||
| 			for file in os.listdir(path): | ||||
| 				if file.endswith("g++.exe"): | ||||
| @@ -172,7 +175,9 @@ def load_marlin_features(): | ||||
|  | ||||
| def MarlinFeatureIsEnabled(env, feature): | ||||
| 	load_marlin_features() | ||||
| 	return feature in env["MARLIN_FEATURES"] | ||||
| 	r = re.compile(feature) | ||||
| 	matches = list(filter(r.match, env["MARLIN_FEATURES"])) | ||||
| 	return len(matches) > 0 | ||||
|  | ||||
| # add a method for others scripts to check if a feature is enabled | ||||
| env.AddMethod(MarlinFeatureIsEnabled) | ||||
|   | ||||
| @@ -11,11 +11,10 @@ set -e | ||||
| # | ||||
| restore_configs | ||||
| opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32 | ||||
| opt_enable WIFISUPPORT GCODE_MACROS BAUD_RATE_GCODE M115_GEOMETRY_REPORT REPETIER_GCODE_M360 | ||||
| opt_enable WIFISUPPORT WEBSUPPORT GCODE_MACROS BAUD_RATE_GCODE M115_GEOMETRY_REPORT REPETIER_GCODE_M360 | ||||
| opt_add WIFI_SSID "\"ssid\"" | ||||
| opt_add WIFI_PWD "\"password\"" | ||||
| opt_set TX_BUFFER_SIZE 64 | ||||
| opt_add WEBSUPPORT | ||||
| exec_test $1 $2 "ESP32 with WIFISUPPORT and WEBSUPPORT" | ||||
|  | ||||
| # | ||||
|   | ||||
		Reference in New Issue
	
	Block a user