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