add client_remove_by_index for reaper

This commit is contained in:
jess 2026-04-03 03:48:03 -07:00
parent a9f6f9f6ac
commit 9825ddb287
1 changed files with 8 additions and 0 deletions

View File

@ -86,6 +86,14 @@ static void client_remove_by_mac(const uint8_t *mac)
xSemaphoreGive(client_mutex);
}
/* caller must hold client_mutex */
static void client_remove_by_index(int idx)
{
if (idx < 0 || idx >= client_count) return;
printf("REAP: removing client %d\n", idx);
clients[idx] = clients[--client_count];
}
static void parse_udp_sysex(const uint8_t *data, uint16_t len)
{
if (len < 3 || data[0] != 0xF0 || data[1] != 0x7D)