Add preliminary support for HMC5883L magnetometer and MPL3115A2 altimeter.

Logging only, at this stage.
This commit is contained in:
2014-11-23 18:54:11 +00:00
parent 56de69735f
commit 8b3ff9feba
11 changed files with 329 additions and 11 deletions

4
log.c
View File

@@ -36,8 +36,10 @@ void log_put_byte(char c)
/* If the buffer is full, we just discard data.
* Better than overrunning.
*/
if (((log_bufferend + 1) % LOG_BUFFERSIZE) == log_bufferstart)
if (((log_bufferend + 1) % LOG_BUFFERSIZE) == log_bufferstart) {
putstr("^");
return;
}
log_buffer[log_bufferend++] = c;
log_bufferend = log_bufferend % LOG_BUFFERSIZE;
#if 0