From a8d18fa02aa1f188589fde8221bc6ef4a1c94f0b Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Fri, 8 Mar 2024 19:04:47 +0000 Subject: [PATCH] Cleanup default packet template and fix comments --- applications/system/findmy/findmy.c | 34 +++++++---------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/applications/system/findmy/findmy.c b/applications/system/findmy/findmy.c index 6ccade2bf..ed7d472f0 100644 --- a/applications/system/findmy/findmy.c +++ b/applications/system/findmy/findmy.c @@ -95,32 +95,14 @@ static void findmy_start(FindMy* app) { *it++ = 0x1E; // Length *it++ = 0xFF; // Manufacturer Specific Data *it++ = 0x4C; // Company ID (Apple, Inc.) - *it++ = 0x00; // State - *it++ = 0x12; // Data - Public Key without the MAC address - *it++ = 0x19; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; - *it++ = 0x00; + *it++ = 0x00; // ... + *it++ = 0x12; // Type (FindMy) + *it++ = 0x19; // Length + *it++ = 0x00; // Status + // Placeholder Empty Public Key without the MAC address + for(size_t i = 0; i < 22; ++i) { + *it++ = 0x00; + } *it++ = 0x00; // First 2 bits are the version, the rest is the battery level *it++ = 0x00; // Hint (0x00)