run auto-formatter
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-03-28 13:54:46 +02:00
parent 1f12a249f5
commit e6ad0978de
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
7 changed files with 54 additions and 66 deletions

View File

@ -413,23 +413,23 @@ void initmission::createTestTasks(TaskFactory& factory,
}
/**
â â
âŒâ∠ââââŒ
âŒââ∠ââââââ?
â?ââââââââââââââââââ?
âââââââââââââââˆââââˆââ?
âââââââââââââââââââˆâˆâââŒ
â?ââââââââââââââââââââââââŒ
âŒâââŒâˆâââââââââˆâââââââââˆââ?
â?ââââââââââââŒâˆâˆââââââââââââŒ
âŒââââˆâˆâââââââââââââââââââââŒ
âŒâââ?ââˆââˆâŒâââââââââââââââââââ?
â?âââ?ââ?âââââââââââââââââââââââŒ
â?âââââââââââââââââââââââââââ?
âŒââââââââââââââââââââââââââŒ
â?âââââââââââââââââââââââââ?
âââââââââââââââââââââââââŒ
ââââââââââââââââââââââ
ââââââââââââââââââ
ââââââââââââ
**/

View File

@ -109,7 +109,7 @@ void Factory::setStaticFrameworkObjectIds() {
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER;
// DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
// DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
#if OBSW_TM_TO_PTME == 1
TmFunnel::downlinkDestination = objects::CCSDS_HANDLER;
@ -915,8 +915,8 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
std::stringstream consumer;
#if OBSW_ADD_PLOC_MPSOC == 1
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART, consumer.str(),
Direction::OUT, Levels::HIGH);
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
consumer.str(), Direction::OUT, Levels::HIGH);
auto mpsocGpioCookie = new GpioCookie;
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
gpioComIF->addGpios(mpsocGpioCookie);
@ -934,7 +934,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
#if OBSW_ADD_PLOC_SUPERVISOR == 1
consumer << "0x" << std::hex << objects::PLOC_SUPERVISOR_HANDLER;
auto gpioConfigSupv = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_SUPV_UART, consumer.str(),
Direction::OUT, Levels::HIGH);
Direction::OUT, Levels::HIGH);
auto supvGpioCookie = new GpioCookie;
supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv);
gpioComIF->addGpios(supvGpioCookie);
@ -943,7 +943,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
uart::PLOC_SUPERVISOR_BAUD, PLOC_SPV::MAX_PACKET_SIZE * 20);
supervisorCookie->setNoFixedSizeReply();
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF));
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF));
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
static_cast<void>(consumer);
}

View File

@ -7,8 +7,8 @@
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/gpio/Gpio.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/MPSoCReturnValuesIF.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"

View File

@ -12,8 +12,7 @@
#include "OBSWConfig.h"
PlocSupervisorHandler::PlocSupervisorHandler(object_id_t objectId, object_id_t uartComIFid,
CookieIF* comCookie,
Gpio uartIsolatorSwitch)
CookieIF* comCookie, Gpio uartIsolatorSwitch)
: DeviceHandlerBase(objectId, uartComIFid, comCookie),
uartIsolatorSwitch(uartIsolatorSwitch),
hkset(this),
@ -49,8 +48,8 @@ void PlocSupervisorHandler::doStartUp() {
}
void PlocSupervisorHandler::doShutDown() {
setMode(_MODE_POWER_DOWN);
uartIsolatorSwitch.pullLow();
setMode(_MODE_POWER_DOWN);
uartIsolatorSwitch.pullLow();
}
ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
@ -380,10 +379,11 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
return result;
}
ReturnValue_t PlocSupervisorHandler::getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) {
*numberOfSwitches = 1;
*switches = &powerSwitch;
return RETURN_OK;
ReturnValue_t PlocSupervisorHandler::getSwitches(const uint8_t** switches,
uint8_t* numberOfSwitches) {
*numberOfSwitches = 1;
*switches = &powerSwitch;
return RETURN_OK;
}
ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,

View File

@ -1,15 +1,14 @@
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#include "bsp_q7s/memory/SdCardManager.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/gpio/Gpio.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#include "devices/powerSwitcherList.h"
#include "OBSWConfig.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "devices/powerSwitcherList.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw_hal/linux/gpio/Gpio.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
/**
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
@ -147,7 +146,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
/** Setting this variable to true will enable direct downlink of MRAM packets */
bool downlinkMramDump = false;
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches);
ReturnValue_t getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches);
/**
* @brief This function checks the crc of the received PLOC reply.

View File

@ -1,24 +1,16 @@
#include "DummyGpioIF.h"
DummyGpioIF::DummyGpioIF() {
}
DummyGpioIF::DummyGpioIF() {}
DummyGpioIF::~DummyGpioIF() {
}
DummyGpioIF::~DummyGpioIF() {}
ReturnValue_t DummyGpioIF::addGpios(GpioCookie* cookie) {
return RETURN_OK;
}
ReturnValue_t DummyGpioIF::addGpios(GpioCookie* cookie) { return RETURN_OK; }
ReturnValue_t DummyGpioIF::pullHigh(gpioId_t gpioId) {
return RETURN_OK;
}
ReturnValue_t DummyGpioIF::pullHigh(gpioId_t gpioId) { return RETURN_OK; }
ReturnValue_t DummyGpioIF::pullLow(gpioId_t gpioId) {
return RETURN_OK;
}
ReturnValue_t DummyGpioIF::pullLow(gpioId_t gpioId) { return RETURN_OK; }
ReturnValue_t DummyGpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
*gpioState = 0;
return RETURN_OK;
*gpioState = 0;
return RETURN_OK;
}

View File

@ -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;