From: Keith Packard Date: Mon, 30 Aug 2010 04:36:47 +0000 (-0700) Subject: altosui: provide separate flush_input/flush_output for serial. deal with monitor... X-Git-Tag: debian/0.7+22+g4790f78~21 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=ae02b1590439d5c8dfb472cf1f83a14fdcfbaf11;hp=ae02b1590439d5c8dfb472cf1f83a14fdcfbaf11;ds=sidebyside altosui: provide separate flush_input/flush_output for serial. deal with monitor automatically (yes, this should be two patches, but the diffs in AltosSerial were merged together). First, this replaces the existing flush/flush_reply mess with two simple functions, one to flush output to the serial device, making sure that all data written will be seen while we wait for input. The other sucks any pending input off of the serial line and discards it. Second, AltosSerial now tracks whether the serial line is being used for telemetry monitoring. If so, it enables monitoring, otherwise it disables it. Eliminates a bunch of manual state tracking elsewhere. Signed-off-by: Keith Packard ---