Merge remote-tracking branch 'ofw/dev' into mntm-dev

This commit is contained in:
Willy-JL
2025-04-12 06:35:36 +01:00
151 changed files with 2802 additions and 1745 deletions

View File

@@ -156,11 +156,22 @@ def DumpApplicationConfig(target, source, env):
print(fg.boldgreen("Firmware modules configuration:"))
for apptype in FlipperAppType:
app_sublist = env["APPBUILD"].get_apps_of_type(apptype)
if app_sublist:
# Print a warning if any apps in the list have same .order value
unique_order_values = set(app.order for app in app_sublist)
if len(app_sublist) != len(unique_order_values) and max(unique_order_values):
print(
fg.red(f"{apptype.value}: ")
+ fg.yellow(
"Duplicate .order values in group:\n\t"
+ ", ".join(f"{app.appid} ({app.order})" for app in app_sublist)
)
)
elif app_sublist:
print(
fg.green(f"{apptype.value}:\n\t"),
", ".join(app.appid for app in app_sublist),
)
if incompatible_ext_apps := env["APPBUILD"].get_incompatible_ext_apps():
print(
fg.blue("Incompatible apps (skipped):\n\t"),

View File

@@ -303,6 +303,8 @@ def _validate_app_imports(target, source, env):
"js_flags_set",
"js_flags_wait",
"js_module_get",
"js_value_buffer_size",
"js_value_parse",
# js_event_loop_api_table
"js_event_loop_get_loop",
# js_gui_api_table

View File

@@ -32,16 +32,27 @@ def main():
bytes_to_send = args.length
block_size = 1024
success = True
while bytes_to_send:
actual_size = min(block_size, bytes_to_send)
# can't use 0x03 because that's ASCII ETX, or Ctrl+C
block = bytes([randint(4, 255) for _ in range(actual_size)])
# block = bytes([randint(4, 255) for _ in range(actual_size)])
block = bytes([4 + (i // 64) for i in range(actual_size)])
port.write(block)
return_block = port.read(actual_size)
if return_block != block:
logger.error("Incorrect block received")
with open("block.bin", "wb") as f:
f.write(block)
with open("return_block.bin", "wb") as f:
f.write(return_block)
logger.error(
"Incorrect block received. Saved to `block.bin' and `return_block.bin'."
)
logger.error(f"{bytes_to_send} bytes left. Aborting.")
success = False
break
bytes_to_send -= actual_size
@@ -49,7 +60,8 @@ def main():
end_time = time()
delta = end_time - start_time
speed = args.length / delta
print(f"Speed: {speed/1024:.2f} KiB/s")
if success:
print(f"Speed: {speed/1024:.2f} KiB/s")
port.write(b"\x03") # Ctrl+C
port.close()