From c06fd78b834582349e1aaed07f582ae0c9fd3462 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Tue, 28 Oct 2014 15:49:02 +0000 Subject: [PATCH] Fix being unable to change port function of serial port during runtime. Closes #144. Thanks @frank26080115 --- src/main/io/serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 09b3d877f..a3622e0d0 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -372,6 +372,8 @@ void endSerialPortFunction(serialPort_t *port, serialPortFunction_e function) serialPortFunction_t *serialPortFunction = findSerialPortFunctionByPort(port); serialPortFunction->currentFunction = FUNCTION_NONE; + serialPortFunction->scenario = SCENARIO_UNUSED; + serialPortFunction->port = NULL; } functionConstraint_t *getConfiguredFunctionConstraint(serialPortFunction_e function)