diff --git a/src/freertos_drivers/st/Stm32RailcomSender.cxx b/src/freertos_drivers/st/Stm32RailcomSender.cxx index afc8f41b0..d90f5a667 100644 --- a/src/freertos_drivers/st/Stm32RailcomSender.cxx +++ b/src/freertos_drivers/st/Stm32RailcomSender.cxx @@ -71,7 +71,7 @@ void Stm32RailcomSender::middle_cutout() // Nothing to send or came too late and should not be sent. return; } - if (__HAL_UART_GET_IT(&uartHandle, UART_IT_TXE)) { + if (!__HAL_UART_GET_IT(&uartHandle, UART_IT_TXE)) { // Transmission is not complete yet. That's weird. return; } diff --git a/src/freertos_drivers/st/Stm32RailcomSender.hxx b/src/freertos_drivers/st/Stm32RailcomSender.hxx index ce4b18c42..eeff2291b 100644 --- a/src/freertos_drivers/st/Stm32RailcomSender.hxx +++ b/src/freertos_drivers/st/Stm32RailcomSender.hxx @@ -95,16 +95,16 @@ private: /// Called after the cutout is over. void end_cutout() override { // We throw away the packets that we got given. - ch1Pkt_ = nullptr; - ch2Pkt_ = nullptr; + //ch1Pkt_ = nullptr; + //ch2Pkt_ = nullptr; } /// Called instead of start/mid/end-cutout at the end of the current packet /// if there was no cutout requested. void no_cutout() override { // We throw away the packets that we got given. - ch1Pkt_ = nullptr; - ch2Pkt_ = nullptr; + //ch1Pkt_ = nullptr; + //ch2Pkt_ = nullptr; } /// Feedback key is set by the DCC decoder driver. The feedback packet must /// carry the same feedback key or else it will not be transmitted.