Changed the way loader.c loads Clock/iButton/U2F

Added a new variable in application.fam file to add the link to the FAP. It now supports any FAP as long as the application.fam file is formatted correctly and you create a loader "app".

If no link is specified in the application.fam file, it doesn't attempt to load a FAP.
This commit is contained in:
ESurge
2022-09-21 03:08:32 -07:00
parent c1dcba9549
commit 244a8456ef
10 changed files with 48 additions and 393 deletions

View File

@@ -35,6 +35,7 @@ class FlipperApplication:
stack_size: int = 2048
icon: Optional[str] = None
order: int = 0
link: Optional[str] = ""
sdk_headers: List[str] = field(default_factory=list)
# .fap-specific
sources: List[str] = field(default_factory=lambda: ["*.c*"])
@@ -255,6 +256,7 @@ class ApplicationsCGenerator:
.name = "{app.name}",
.stack_size = {app.stack_size},
.icon = {f"&{app.icon}" if app.icon else "NULL"},
.link = "{f"{app.link}" if app.link else "NULL"}",
.flags = {'|'.join(f"FlipperApplicationFlag{flag}" for flag in app.flags)} }}"""
def generate(self):