mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 19:34:06 +02:00
flashtool: don't allow MCU mismatches
Raise a FlashError if Katapult's MCU does not match the MCU detected in klipper.bin. If a user wants to flash a binary built for a different they can rename klipper.bin, which will bypass detection. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
b22330e917
commit
6c836fc898
@ -301,9 +301,9 @@ class CanFlasher:
|
||||
if self.klipper_dict is not None:
|
||||
bin_mcu = self.klipper_dict.get("config", {}).get("MCU", "")
|
||||
if bin_mcu and bin_mcu != mcu_type:
|
||||
output_line(
|
||||
"WARNING: MCU returned by Katapult does not match MCU"
|
||||
"stored in klipper.bin.\n"
|
||||
raise FlashError(
|
||||
"MCU returned by Katapult does not match MCU"
|
||||
"identified in klipper.bin.\n"
|
||||
f"Katapult MCU: {mcu_type}\n"
|
||||
f"Klipper Binary MCU: {bin_mcu}"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user