From 1bc7a918694030d1f49f1d2998a289d77b132849 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 1 Apr 2022 14:08:29 +0200 Subject: [PATCH] apply auto-formatter --- hal/src/fsfw_hal/linux/gpio/Gpio.h | 15 ++++++--------- src/fsfw/action/CommandActionHelper.h | 3 +-- src/fsfw/devicehandlers/DeviceHandlerBase.cpp | 13 ++++++------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/hal/src/fsfw_hal/linux/gpio/Gpio.h b/hal/src/fsfw_hal/linux/gpio/Gpio.h index 2ffe2146..40cc1df5 100644 --- a/hal/src/fsfw_hal/linux/gpio/Gpio.h +++ b/hal/src/fsfw_hal/linux/gpio/Gpio.h @@ -12,16 +12,13 @@ class Gpio { public: Gpio(gpioId_t gpioId, GpioIF* gpioIF) : gpioId(gpioId), gpioIF(gpioIF) { - if (gpioIF == nullptr) { - sif::error << "Gpio::Gpio: Invalid GpioIF" << std::endl; - } - } - ReturnValue_t pullHigh() { - return gpioIF->pullHigh(gpioId); - } - ReturnValue_t pullLow() { - return gpioIF->pullLow(gpioId); + if (gpioIF == nullptr) { + sif::error << "Gpio::Gpio: Invalid GpioIF" << std::endl; + } } + ReturnValue_t pullHigh() { return gpioIF->pullHigh(gpioId); } + ReturnValue_t pullLow() { return gpioIF->pullLow(gpioId); } + private: gpioId_t gpioId = gpio::NO_GPIO; GpioIF* gpioIF = nullptr; diff --git a/src/fsfw/action/CommandActionHelper.h b/src/fsfw/action/CommandActionHelper.h index f0eac6d9..3b8acb04 100644 --- a/src/fsfw/action/CommandActionHelper.h +++ b/src/fsfw/action/CommandActionHelper.h @@ -18,8 +18,7 @@ class CommandActionHelper { virtual ~CommandActionHelper(); ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, const uint8_t* data = nullptr, uint32_t size = 0); - ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, - SerializeIF* data); + ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, SerializeIF* data); ReturnValue_t initialize(); ReturnValue_t handleReply(CommandMessage* reply); uint8_t getCommandCount() const; diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp index 12473590..b0a5d1f0 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp @@ -466,16 +466,15 @@ size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) { DeviceCommandId_t replyId = NO_COMMAND_ID; DeviceCommandMap::iterator command = cookieInfo.pendingCommand; if (command->second.useAlternativeReplyId) { - replyId = command->second.alternativeReplyId; - } - else { - replyId = commandId; + replyId = command->second.alternativeReplyId; + } else { + replyId = commandId; } DeviceReplyIter iter = deviceReplyMap.find(replyId); if (iter != deviceReplyMap.end()) { - if (iter->second.delayCycles != 0) { - return iter->second.replyLen; - } + if (iter->second.delayCycles != 0) { + return iter->second.replyLen; + } } return 0; }