From 7005314d4b66850d98ac03a11588641a39d3d831 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 9 Feb 2022 12:07:29 +0100 Subject: [PATCH] apply clang-format --- linux/boardtest/UartTestClass.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/linux/boardtest/UartTestClass.cpp b/linux/boardtest/UartTestClass.cpp index 796e5719..b8e7da10 100644 --- a/linux/boardtest/UartTestClass.cpp +++ b/linux/boardtest/UartTestClass.cpp @@ -1,5 +1,6 @@ -#include #include "UartTestClass.h" + +#include #if defined(RASPBERRY_PI) #include "rpiConfig.h" #elif defined(XIPHOS_Q7S) @@ -11,9 +12,9 @@ #include // write(), read(), close() #include "fsfw/globalfunctions/CRC.h" +#include "fsfw/globalfunctions/DleEncoder.h" #include "fsfw/globalfunctions/arrayprinter.h" #include "fsfw/serviceinterface.h" -#include "fsfw/globalfunctions/DleEncoder.h" #include "mission/devices/devicedefinitions/SCEXDefinitions.h" #define GPS_REPLY_WIRETAPPING 0 @@ -152,8 +153,8 @@ void UartTestClass::scexInit() { // Non-blocking mode, read until either line is 0.1 second idle or maximum of 255 bytes are // received in one go - tty.c_cc[VTIME] = 1; // In units of 0.1 seconds - tty.c_cc[VMIN] = 255; // Read up to 255 bytes + tty.c_cc[VTIME] = 1; // In units of 0.1 seconds + tty.c_cc[VMIN] = 255; // Read up to 255 bytes if (tcsetattr(serialPort, TCSANOW, &tty) != 0) { sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno) @@ -180,11 +181,11 @@ void UartTestClass::scexPeriodic() { tmpCmdBuf[6] = crc & 0xff; size_t encodedLen = 0; - ReturnValue_t result = dleEncoder.encode(tmpCmdBuf.data(), 7, cmdBuf.data(), - cmdBuf.size(), &encodedLen, true); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::warning << "UartTestClass::scexInit: Encoding failed" << std::endl; - return; + ReturnValue_t result = + dleEncoder.encode(tmpCmdBuf.data(), 7, cmdBuf.data(), cmdBuf.size(), &encodedLen, true); + if (result != HasReturnvaluesIF::RETURN_OK) { + sif::warning << "UartTestClass::scexInit: Encoding failed" << std::endl; + return; } arrayprinter::print(cmdBuf.data(), 9); size_t bytesWritten = write(serialPort, cmdBuf.data(), encodedLen);