mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
misc/usbdbg: Increase text buffer size in GET_STATE.
This commit is contained in:
parent
547859cb00
commit
3e61aa8933
@ -226,9 +226,10 @@ void usbdbg_data_in(void *buffer, int length) {
|
||||
|
||||
// The rest of this packet is packed with text buffer.
|
||||
if (tx_buf_len) {
|
||||
tx_buf_len = OMV_MIN(tx_buf_len, (40 - 1));
|
||||
usb_cdc_get_buf((uint8_t *) buffer + 24, tx_buf_len);
|
||||
((uint8_t *) buffer)[24 + tx_buf_len] = 0; // Null-terminate
|
||||
const uint32_t hdr = 16;
|
||||
tx_buf_len = OMV_MIN(tx_buf_len, (64 - hdr - 1));
|
||||
usb_cdc_get_buf((uint8_t *) buffer + hdr, tx_buf_len);
|
||||
((uint8_t *) buffer)[hdr + tx_buf_len] = 0; // Null-terminate
|
||||
}
|
||||
|
||||
cmd = USBDBG_NONE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user