wirepas / wm-sdk

SDK to develop applications on the MCU running Wirepas Stack
Other
44 stars 33 forks source link

Definition for logging flush delay #49

Open timov50 opened 2 years ago

timov50 commented 2 years ago

Hi,

It is possible to define baudrate for logging but flush delay is defined for fixed 115200 baudrate.

/** Time to flush Usart buffer in ms (buffer is 512 bytes,
 *  so ~45ms to flush full buffer).
 */
#define FLUSH_DELAY_MS 45

Could it be possible to define the flush delay so that it is calculated based on defined baudrate? Something like this:

#define FLUSH_DELAY_MS (45 * 115200.0 / DEBUG_LOG_UART_BAUDRATE)

-timo-