diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-30 19:45:24 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-30 19:45:24 +0100 |
commit | 677192d416caeffe5be5aeff0f551b9679797132 (patch) | |
tree | af987ffb7095798482d0347abc8a09d6de569a32 /stm32f091 | |
parent | b0aa9784978a5f63a8d7be614ab77684de4315f3 (diff) |
fix regression
Diffstat (limited to 'stm32f091')
-rw-r--r-- | stm32f091/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stm32f091/server.c b/stm32f091/server.c index 1d4a469..903de38 100644 --- a/stm32f091/server.c +++ b/stm32f091/server.c @@ -162,7 +162,7 @@ void ws_server_send(uint8_t* data, size_t size) { } void ws_server_buffer_send_append(uint8_t* data, size_t size) { - size_t limited_size = WS_MIN(size, g_ws_esp8266_dma_tx_buffer_head - g_ws_esp8266_dma_tx_buffer_tail); + size_t limited_size = WS_MIN(size, WS_DMA_TX_BUFFER_SIZE - g_ws_esp8266_dma_tx_buffer_head); strncpy((char*) &g_ws_esp8266_dma_tx_buffer[g_ws_esp8266_dma_tx_buffer_head], (char*) data, limited_size); // append string g_ws_esp8266_dma_tx_buffer_head += size; // shift head } |