Raise host frame payload limit so multi-client UART replies fit.
Use a uint16 LE length and 1024-byte max payload so CLIENT_INFO and BATTERY_STATUS no longer fail encoding past ~10 connected pods. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-3
@@ -113,8 +113,8 @@ static esp_err_t send_tick_truncated(alox_UartMessage *msg) {
|
||||
|
||||
size_t payload_len = stream.bytes_written + 1;
|
||||
uint16_t max_pay = ble_host_max_payload();
|
||||
/* Framed size = payload + 4; notify must fit ATT MTU-3. */
|
||||
size_t frame_len = payload_len + 4;
|
||||
/* Framed size = payload + UART_FRAME_OVERHEAD; notify must fit ATT MTU-3. */
|
||||
size_t frame_len = payload_len + UART_FRAME_OVERHEAD;
|
||||
if (payload_len <= MAX_PAYLOAD_SIZE && frame_len <= max_pay) {
|
||||
uint8_t payload[MAX_PAYLOAD_SIZE];
|
||||
payload[0] = (uint8_t)msg->type;
|
||||
@@ -197,7 +197,7 @@ void ble_stream_update(void) {
|
||||
|
||||
if (want && !s_running) {
|
||||
s_running = true;
|
||||
if (xTaskCreate(ble_stream_task, "ble_stream", 4096, NULL, 5, &s_task) !=
|
||||
if (xTaskCreate(ble_stream_task, "ble_stream", 8192, NULL, 5, &s_task) !=
|
||||
pdPASS) {
|
||||
s_running = false;
|
||||
s_task = NULL;
|
||||
|
||||
Reference in New Issue
Block a user