mirror of https://github.com/ArduPilot/ardupilot
Added buffer overflow warning.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@810 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
33a7d26846
commit
a771cbacc0
|
@ -98,6 +98,13 @@ BinComm::update(void)
|
||||||
// XXX we might want to further constrain this count
|
// XXX we might want to further constrain this count
|
||||||
count = _interface->available();
|
count = _interface->available();
|
||||||
|
|
||||||
|
if (count >= 128)
|
||||||
|
{
|
||||||
|
char text[50];
|
||||||
|
strncpy(text,"buffer overflow",50);
|
||||||
|
send_msg_status_text(1,text);
|
||||||
|
}
|
||||||
|
|
||||||
while (count--)
|
while (count--)
|
||||||
_decode(_interface->read());
|
_decode(_interface->read());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue