forked from Archive/PX4-Autopilot
Fixed missing count
This commit is contained in:
parent
5dfde44c56
commit
e655c0fc57
|
@ -97,6 +97,14 @@ void mavlink_logbuffer_vasprintf(struct mavlink_logbuffer *lb, int severity, con
|
|||
lb->elems[end].severity = severity;
|
||||
vsnprintf(lb->elems[end].text, sizeof(lb->elems[0].text), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
/* increase count */
|
||||
if (mavlink_logbuffer_is_full(lb)) {
|
||||
lb->start = (lb->start + 1) % lb->size; /* full, overwrite */
|
||||
|
||||
} else {
|
||||
++lb->count;
|
||||
}
|
||||
}
|
||||
|
||||
__EXPORT void mavlink_vasprintf(int _fd, int severity, const char *fmt, ...)
|
||||
|
|
Loading…
Reference in New Issue