mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-14 12:02:38 +08:00
AP_HAL_AVR Console: bugfix on buffer bytes free vs used
* had them reversed. doh
This commit is contained in:
1 parent
fd89bacbc8
commit
40734bc2f2
1 file changed
+2
-2
@@ -174,11 +174,11 @@ int AVRConsoleDriver::Buffer::peek() {
|
||||
return (int) b;
|
||||
}
|
||||
|
||||
uint16_t AVRConsoleDriver::Buffer::bytes_free() {
|
||||
uint16_t AVRConsoleDriver::Buffer::bytes_used() {
|
||||
return ((_head - _tail) & _mask);
|
||||
}
|
||||
|
||||
uint16_t AVRConsoleDriver::Buffer::bytes_used() {
|
||||
uint16_t AVRConsoleDriver::Buffer::bytes_free() {
|
||||
return ((_mask+1) - ((_head - _tail) & _mask));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user