From: Keith Packard Date: Mon, 25 Apr 2016 22:50:58 +0000 (-0400) Subject: altos: Clear packet queue when starting packet master X-Git-Tag: 1.6.3~2^2~19 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=565404599fe9edf9ba16aec348eeb19ea31af743 altos: Clear packet queue when starting packet master This avoids overfilling the packet buffer when disconnected. Applications using packet mode shouldn't expect that output be saved across master sessions. Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_packet_master.c b/src/drivers/ao_packet_master.c index 5e440db0..2beda4cb 100644 --- a/src/drivers/ao_packet_master.c +++ b/src/drivers/ao_packet_master.c @@ -117,6 +117,7 @@ ao_packet_forward(void) __reentrant { char c; ao_packet_enable = 1; + ao_packet_tx_used = 0; ao_cmd_white(); flush();