mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:53:33 +08:00
sdlog2 -b option (log buffer size) added, minor cleanup
This commit is contained in:
@@ -45,12 +45,13 @@
|
||||
|
||||
#include "logbuffer.h"
|
||||
|
||||
void logbuffer_init(struct logbuffer_s *lb, int size)
|
||||
int logbuffer_init(struct logbuffer_s *lb, int size)
|
||||
{
|
||||
lb->size = size;
|
||||
lb->write_ptr = 0;
|
||||
lb->read_ptr = 0;
|
||||
lb->data = malloc(lb->size);
|
||||
return (lb->data == 0) ? ERROR : OK;
|
||||
}
|
||||
|
||||
int logbuffer_count(struct logbuffer_s *lb)
|
||||
|
||||
Reference in New Issue
Block a user