delta_buffer 크기 400 -> 420

- num_samples=140일 때 압축 worst case = 419바이트
This commit is contained in:
2026-04-17 14:20:28 +09:00
parent 0294cdb428
commit 231a000849

View File

@@ -1095,8 +1095,7 @@ dr_adc_err_t dr_adc_delta_compress(const uint16_t *samples, uint16_t num_samples
} }
dr_adc_err_t dr_adc_transmit_channel_delta(const dr_maa_channel_t *ch_data, dr_adc_err_t dr_adc_transmit_channel_delta(const dr_maa_channel_t *ch_data, uint8_t *ble_buffer)
uint8_t *ble_buffer)
{ {
if (ch_data == NULL || ble_buffer == NULL) if (ch_data == NULL || ble_buffer == NULL)
{ {
@@ -1104,7 +1103,7 @@ dr_adc_err_t dr_adc_transmit_channel_delta(const dr_maa_channel_t *ch_data,
} }
/* Compress data first */ /* Compress data first */
static uint8_t delta_buffer[400] = {0}; /* Worst case: 140*3 = 420 bytes */ static uint8_t delta_buffer[420] = {0}; /* Worst case when num_samples=140: 140 * 3 = 420 bytes */
uint16_t compressed_size = 0; uint16_t compressed_size = 0;
dr_adc_err_t err = dr_adc_delta_compress(ch_data->samples, ch_data->num_samples, dr_adc_err_t err = dr_adc_delta_compress(ch_data->samples, ch_data->num_samples,