#include <log.h>
The data log is useful for tracking data when your robot is not in range of an IR tower. This was built so as to minimize impact on the rest of the kernel, so it has several bugs that may cause brickOS to crash. If used as prescribed, however, the data log can be a very useful tool.
To use the data log, your program must first allocate space by issuing the command
init_log
. This command must be issued by your main program thread.
If not, brickOS will probably crash.
After your program is finished, the very first thing you should do is retrieve the datalog using the PC-side tools. If you execute a program which does not use the datalog, do not try to download the log, as this may cause brickOS to crash.
size
bytes for it. If a log had already
been allocated, the old log is destroyed before the new one is allocated. Returns 1 on
success, 0 on failure.