Helpful logging and error format
Inspired by this blog post.
Work in Progress
Diff: LogUtil.cpp
- Revision:
- 1:491d2a7f4207
- Parent:
- 0:3054bbdace4c
- Child:
- 3:9f20058284bd
--- a/LogUtil.cpp Fri Mar 29 17:36:50 2013 +0000 +++ b/LogUtil.cpp Fri Mar 29 20:02:18 2013 +0000 @@ -3,7 +3,7 @@ * @brief Utility to log messages during runtime * @author sam grove * @version 1.0 - * @see http://www.drdobbs.com/cpp/a-lightweight-logger-for-c/240147505?pgno=2 + * @see http://www.drdobbs.com/cpp/a-lightweight-logger-for-c/240147505 * * Copyright (c) 2013 * @@ -27,6 +27,9 @@ { Serial debug(USBTX, USBRX); debug.baud(921600); + debug.printf("\033[2J"); // clear the terminal + debug.printf("\033[1;1H");// and set the cursor to home + wait(0.5f); return; }