From 3699c76985b342c4e628cbaaf3d2d26ec25c317b Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 1 Sep 2024 09:00:52 +0200 Subject: [PATCH] text formatting --- scripts/rename_fw.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/rename_fw.py b/scripts/rename_fw.py index 6478d4e61..5553144ea 100755 --- a/scripts/rename_fw.py +++ b/scripts/rename_fw.py @@ -54,8 +54,11 @@ def bin_copy(source, target, env): print("*********************************************") print("EMS-ESP version: " + app_version) - print("Has PSRAM: "+str(psram)) - print("mcu: "+str(mcu)) + + # show psram as Yes or No + psram_status = "Yes" if psram else "No" + print("Has PSRAM: " + psram_status) + print("MCU: "+str(mcu)) print("Flash Mem: " + flash_mem) # convert . to _ so Windows doesn't complain @@ -84,17 +87,19 @@ def bin_copy(source, target, env): if os.path.isfile(f): os.remove(f) - print("Renaming file to "+bin_file) + print("Filename: "+bin_file) # copy firmware.bin to firmware/.bin shutil.copy(str(target[0]), bin_file) with open(bin_file,"rb") as f: result = hashlib.md5(f.read()) - print("Calculating MD5: "+result.hexdigest()) + print("MD5: "+result.hexdigest()) file1 = open(md5_file, 'w') file1.write(result.hexdigest()) file1.close() + + print("*********************************************") env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_copy]) env.AddPostAction("$BUILD_DIR/${PROGNAME}.md5", [bin_copy])