打开日志输出口,需要较大发送缓冲区
This commit is contained in:
parent
bc0059c45f
commit
22d13506a5
|
@ -270,7 +270,9 @@ SerialPort* SerialPort::GetMessagePort()
|
|||
if(isInFPutc) return nullptr;
|
||||
isInFPutc = true;
|
||||
|
||||
// 打开日志输出口,需要较大发送缓冲区
|
||||
sp = _printf_sp = new SerialPort(idx);
|
||||
sp->Tx.SetCapacity(512);
|
||||
sp->Open();
|
||||
|
||||
isInFPutc = false;
|
||||
|
|
|
@ -390,8 +390,8 @@ extern "C"
|
|||
|
||||
va_start(ap, format);
|
||||
//int rs = printf(format, ap);
|
||||
char cs[256];
|
||||
int rs = vsnprintf(cs, 256, format, ap);
|
||||
char cs[512];
|
||||
int rs = vsnprintf(cs, 512, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
sp->Write(Buffer(cs, rs));
|
||||
|
|
Loading…
Reference in New Issue