mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-26 01:48:10 -07:00
Merge branch 'ofw-dev' into xfw-dev
This commit is contained in:
+17
-17
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
import asset_packer
|
||||
from flipper.app import App
|
||||
from flipper.assets.icon import file2image
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
ICONS_SUPPORTED_FORMATS = ["png"]
|
||||
|
||||
ICONS_TEMPLATE_H_HEADER = """#pragma once
|
||||
@@ -129,7 +129,7 @@ class Main(App):
|
||||
if not filenames:
|
||||
continue
|
||||
if "frame_rate" in filenames:
|
||||
self.logger.debug(f"Folder contains animation")
|
||||
self.logger.debug("Folder contains animation")
|
||||
icon_name = "A_" + os.path.split(dirpath)[1].replace("-", "_")
|
||||
width = height = None
|
||||
frame_count = 0
|
||||
@@ -188,7 +188,7 @@ class Main(App):
|
||||
icons_c.write("\n")
|
||||
icons.append((icon_name, width, height, 0, 1))
|
||||
# Create array of images:
|
||||
self.logger.debug(f"Finalizing source file")
|
||||
self.logger.debug("Finalizing source file")
|
||||
for name, width, height, frame_rate, frame_count in icons:
|
||||
icons_c.write(
|
||||
ICONS_TEMPLATE_C_ICONS.format(
|
||||
@@ -203,7 +203,7 @@ class Main(App):
|
||||
icons_c.close()
|
||||
|
||||
# Create Public Header
|
||||
self.logger.debug(f"Creating header")
|
||||
self.logger.debug("Creating header")
|
||||
icons_h = open(
|
||||
os.path.join(self.args.output_directory, f"{self.args.filename}.h"),
|
||||
"w",
|
||||
@@ -213,7 +213,7 @@ class Main(App):
|
||||
for name, width, height, frame_rate, frame_count in icons:
|
||||
icons_h.write(ICONS_TEMPLATE_H_ICON_NAME.format(name=name))
|
||||
icons_h.close()
|
||||
self.logger.debug(f"Done")
|
||||
self.logger.debug("Done")
|
||||
return 0
|
||||
|
||||
def manifest(self):
|
||||
@@ -234,7 +234,7 @@ class Main(App):
|
||||
new_manifest = Manifest(self.args.timestamp)
|
||||
new_manifest.create(directory_path)
|
||||
|
||||
self.logger.info(f"Comparing new manifest with existing")
|
||||
self.logger.info("Comparing new manifest with existing")
|
||||
only_in_old, changed, only_in_new = Manifest.compare(old_manifest, new_manifest)
|
||||
for record in only_in_old:
|
||||
self.logger.info(f"Only in old: {record}")
|
||||
@@ -256,38 +256,38 @@ class Main(App):
|
||||
self.logger.info,
|
||||
)
|
||||
|
||||
self.logger.info(f"Complete")
|
||||
self.logger.info("Complete")
|
||||
|
||||
return 0
|
||||
|
||||
def copro(self):
|
||||
from flipper.assets.copro import Copro
|
||||
|
||||
self.logger.info(f"Bundling coprocessor binaries")
|
||||
self.logger.info("Bundling coprocessor binaries")
|
||||
copro = Copro(self.args.mcu)
|
||||
self.logger.info(f"Loading CUBE info")
|
||||
self.logger.info("Loading CUBE info")
|
||||
copro.loadCubeInfo(self.args.cube_dir, self.args.cube_ver)
|
||||
self.logger.info(f"Bundling")
|
||||
self.logger.info("Bundling")
|
||||
copro.bundle(
|
||||
self.args.output_dir,
|
||||
self.args.stack_file,
|
||||
self.args.stack_type,
|
||||
self.args.stack_addr,
|
||||
)
|
||||
self.logger.info(f"Complete")
|
||||
self.logger.info("Complete")
|
||||
|
||||
return 0
|
||||
|
||||
def dolphin(self):
|
||||
from flipper.assets.dolphin import Dolphin
|
||||
|
||||
self.logger.info(f"Processing Dolphin sources")
|
||||
self.logger.info("Processing Dolphin sources")
|
||||
dolphin = Dolphin()
|
||||
self.logger.info(f"Loading data")
|
||||
self.logger.info("Loading data")
|
||||
dolphin.load(self.args.input_directory)
|
||||
self.logger.info(f"Packing")
|
||||
self.logger.info("Packing")
|
||||
dolphin.pack(self.args.output_directory, self.args.symbol_name)
|
||||
self.logger.info(f"Complete")
|
||||
self.logger.info("Complete")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user