apply clang format
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2022-01-17 15:35:46 +01:00
parent 384122f811
commit 3a274e7a9b
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
7 changed files with 70 additions and 19 deletions

View File

@ -144,9 +144,8 @@ void ObjectFactory::produce(void* args) {
new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
createReactionWheelComponents(gpioComIF);
I2cCookie* bpxI2cCookie =
new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
(void)bpxI2cCookie;
#if OBSW_ADD_PLOC_MPSOC == 1
UartCookie* plocMpsocCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,

View File

@ -1,10 +1,10 @@
#ifndef LINUX_OBC_PTMEIF_H_
#define LINUX_OBC_PTMEIF_H_
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <cstddef>
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
/**
* @brief Interface class for managing the PTME IP Core implemented in the programmable logic.
*

View File

@ -0,0 +1,47 @@
#include "BpxBatteryHandler.h"
BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie)
: DeviceHandlerBase(objectId, comIF, comCookie) {}
BpxBatteryHandler::~BpxBatteryHandler() {}
void BpxBatteryHandler::doStartUp() {}
void BpxBatteryHandler::doShutDown() {}
ReturnValue_t BpxBatteryHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
return HasReturnvaluesIF::RETURN_OK;
}
void BpxBatteryHandler::fillCommandAndReplyMap() {}
ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t* commandData,
size_t commandDataLen) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remainingSize,
DeviceCommandId_t* foundId, size_t* foundLen) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t ixd,
const uint8_t* packet) {
return HasReturnvaluesIF::RETURN_OK;
}
void BpxBatteryHandler::setNormalDatapoolEntriesInvalid() {}
LocalPoolDataSetBase* BpxBatteryHandler::getDataSetHandle(sid_t sid) { return nullptr; }
uint32_t BpxBatteryHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 10000; }
ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -3,28 +3,27 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class BpxBatteryHandler: public DeviceHandlerBase {
public:
class BpxBatteryHandler : public DeviceHandlerBase {
public:
BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
virtual ~BpxBatteryHandler();
protected:
protected:
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
void fillCommandAndReplyMap() override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
size_t commandDataLen) override;
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
size_t* foundLen) override;
size_t* foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t ixd, const uint8_t* packet) override;
void setNormalDatapoolEntriesInvalid() override;
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
LocalDataPoolManager& poolManager) override;
};
#endif /* MISSION_DEVICES_BPXBATTERYHANDLER_H_ */

View File

@ -1,6 +1,7 @@
target_sources(${TARGET_NAME} PUBLIC
GPSHyperionHandler.cpp
GomspaceDeviceHandler.cpp
BpxBatteryHandler.cpp
Tmp1075Handler.cpp
PCDUHandler.cpp
P60DockHandler.cpp

View File

@ -1,7 +1,9 @@
#include "GPSHyperionHandler.h"
#ifdef FSFW_OSAL_LINUX
#include <gps.h>
#include <libgpsmm.h>
#endif
#include <cmath>
@ -22,7 +24,11 @@ GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t parentI
GPSHyperionHandler::~GPSHyperionHandler() {}
void GPSHyperionHandler::performControlOperation() { readGpsDataFromGpsd(); }
void GPSHyperionHandler::performControlOperation() {
#ifdef FSFW_OSAL_LINUX
readGpsDataFromGpsd();
#endif
}
LocalPoolDataSetBase *GPSHyperionHandler::getDataSetHandle(sid_t sid) { return nullptr; }
@ -83,6 +89,7 @@ ReturnValue_t GPSHyperionHandler::handleCommandMessage(CommandMessage *message)
return ExtendedControllerBase::handleCommandMessage(message);
}
#ifdef FSFW_OSAL_LINUX
void GPSHyperionHandler::readGpsDataFromGpsd() {
// The data from the device will generally be read all at once. Therefore, we
// can set all field here
@ -166,3 +173,4 @@ void GPSHyperionHandler::readGpsDataFromGpsd() {
std::cout << "Speed(m/s): " << gps->fix.speed << std::endl;
}
}
#endif

View File

@ -1,14 +1,11 @@
#ifndef VIRTUALCHANNEL_H_
#define VIRTUALCHANNEL_H_
#include "OBSWConfig.h"
#include "linux/obc/PtmeIF.h"
#include "fsfw/ipc/MessageQueueIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw/ipc/MessageQueueIF.h"
#include "linux/obc/PtmeIF.h"
class StorageManagerIF;