From 6e9972e0f7aace46a7aa56fb01b9c8dcdb8392a7 Mon Sep 17 00:00:00 2001 From: Lucas Hicks Date: Tue, 17 Oct 2023 23:02:38 +1000 Subject: [PATCH] Uses methods introduced in version 3.0. Older methods have been deprecated. --- build/figurines/microcontroller_comms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/figurines/microcontroller_comms.py b/build/figurines/microcontroller_comms.py index 8f5127f..7c7c2ab 100644 --- a/build/figurines/microcontroller_comms.py +++ b/build/figurines/microcontroller_comms.py @@ -54,8 +54,8 @@ def initialise_serial(port): def serial_disconnect(): global serialPort, connect_status _LOGGER.info("Disconnecting serial port") - serialPort.flushInput() - serialPort.flushOutput() + serialPort.reset_input_buffer() + serialPort.reset_output_buffer() _LOGGER.info("Flushing input and output") serialPort.close() _LOGGER.info("Closing serial port")