refactor storage, got rid of packet loss on lr1110

This commit is contained in:
liquidraver committed 2026-02-27 22:41:16 +01:00
1 parent 2bd7c5d062
commit bb5aca423c
28 files changed
+1053 -744

No files matched your search

+4 -1
View File
@@ -170,6 +170,9 @@ static size_t write_frame(const uint8_t *src, size_t len)
*/
static void push_callback(uint8_t code, const uint8_t *data, size_t len)
{
/* No point serializing if nobody is listening */
if (!zephcore_ble_is_connected()) return;
/* Push frame: code byte + optional data */
uint8_t push_buf[1 + MAX_FRAME_SIZE - 1];
size_t total_len = 1 + len;
@@ -185,7 +188,7 @@ static void push_callback(uint8_t code, const uint8_t *data, size_t len)
memcpy(&push_buf[1], data, len);
}
LOG_INF("code=0x%02x len=%u (total frame)", code, (unsigned)total_len);
LOG_DBG("code=0x%02x len=%u (total frame)", code, (unsigned)total_len);
write_frame(push_buf, total_len);
}