From 8abe314b180b472c53968a7347018fd0803a09cb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Jan 2022 01:06:19 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Get=20FIRMWARE=5FBIN=20from=20en?= =?UTF-8?q?v?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/marlin.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py index 2114a05fb3..8ac36b7d59 100644 --- a/buildroot/share/PlatformIO/scripts/marlin.py +++ b/buildroot/share/PlatformIO/scripts/marlin.py @@ -49,13 +49,8 @@ def encrypt_mks(source, target, env, new_name): key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] # If FIRMWARE_BIN is defined by config, override all - import re - patt = re.compile("^\\s*#define\\s+FIRMWARE_BIN\\s+\"?(.+)\"?") - with open(join("Marlin", "Configuration.h"), encoding="utf-8") as f: - for line in f: - m = patt.search(line) - if m != None: - new_name = m.group(1) + mf = env["MARLIN_FEATURES"] + if "FIRMWARE_BIN" in mf: new_name = mf["FIRMWARE_BIN"] fwpath = target[0].path fwfile = open(fwpath, "rb")