mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-08 23:08:10 -07:00
Merge branch 'UNLEASHED' into 420
This commit is contained in:
@@ -3,6 +3,7 @@ App(
|
||||
name="Applications",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="fap_loader_app",
|
||||
cdefines=["APP_FAP_LOADER"],
|
||||
requires=[
|
||||
"gui",
|
||||
"storage",
|
||||
|
||||
@@ -11,9 +11,16 @@ static bool favorite_fap_selector_item_callback(
|
||||
uint8_t** icon_ptr,
|
||||
FuriString* item_name) {
|
||||
UNUSED(context);
|
||||
#ifdef APP_FAP_LOADER
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
bool success = fap_loader_load_name_and_icon(file_path, storage, icon_ptr, item_name);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
#else
|
||||
UNUSED(file_path);
|
||||
UNUSED(icon_ptr);
|
||||
UNUSED(item_name);
|
||||
bool success = false;
|
||||
#endif
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -78,9 +78,12 @@ class Main(App):
|
||||
|
||||
def generate(self):
|
||||
stage_basename = "updater.bin" # used to be basename(self.args.stage)
|
||||
dfu_basename = "firmware.dfu" # used to be basename(self.args.dfu)
|
||||
radiobin_basename = "radio.bin" # used to be basename(self.args.radiobin)
|
||||
radiobin_basename_arg = basename(self.args.radiobin)
|
||||
dfu_basename = (
|
||||
"firmware.dfu" if self.args.dfu else ""
|
||||
) # used to be basename(self.args.dfu)
|
||||
radiobin_basename = (
|
||||
"radio.bin" if self.args.radiobin else ""
|
||||
) # used to be basename(self.args.radiobin)
|
||||
resources_basename = ""
|
||||
|
||||
radio_version = 0
|
||||
@@ -116,7 +119,7 @@ class Main(App):
|
||||
if self.args.dfu:
|
||||
dfu_size = os.stat(self.args.dfu).st_size
|
||||
shutil.copyfile(self.args.dfu, join(self.args.directory, dfu_basename))
|
||||
if radiobin_basename_arg:
|
||||
if radiobin_basename:
|
||||
shutil.copyfile(
|
||||
self.args.radiobin, join(self.args.directory, radiobin_basename)
|
||||
)
|
||||
@@ -156,13 +159,10 @@ class Main(App):
|
||||
file.writeComment("little-endian hex!")
|
||||
file.writeKey("Loader CRC", self.int2ffhex(self.crc(self.args.stage)))
|
||||
file.writeKey("Firmware", dfu_basename)
|
||||
if radiobin_basename_arg:
|
||||
file.writeKey("Radio", radiobin_basename)
|
||||
else:
|
||||
file.writeKey("Radio", "")
|
||||
file.writeKey("Radio", radiobin_basename or "")
|
||||
file.writeKey("Radio address", self.int2ffhex(radio_addr))
|
||||
file.writeKey("Radio version", self.int2ffhex(radio_version, 12))
|
||||
if radiobin_basename_arg:
|
||||
if radiobin_basename:
|
||||
file.writeKey("Radio CRC", self.int2ffhex(self.crc(self.args.radiobin)))
|
||||
else:
|
||||
file.writeKey("Radio CRC", self.int2ffhex(0))
|
||||
|
||||
Reference in New Issue
Block a user