v1.12.0 #269

Merged
muellerr merged 493 commits from develop into main 2022-07-04 11:19:05 +02:00
2 changed files with 10 additions and 8 deletions
Showing only changes of commit 974ff0a13e - Show all commits

View File

@ -1,12 +1,12 @@
#include "RwHandler.h" #include "RwHandler.h"
#include "OBSWConfig.h"
#include <fsfw/datapool/PoolReadGuard.h> #include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/CRC.h> #include <fsfw/globalfunctions/CRC.h>
#include <fsfw_hal/common/gpio/GpioIF.h>
#include "OBSWConfig.h"
RwHandler::RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, RwHandler::RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
LinuxLibgpioIF* gpioComIF, gpioId_t enableGpio) GpioIF* gpioComIF, gpioId_t enableGpio)
: DeviceHandlerBase(objectId, comIF, comCookie), : DeviceHandlerBase(objectId, comIF, comCookie),
gpioComIF(gpioComIF), gpioComIF(gpioComIF),
enableGpio(enableGpio), enableGpio(enableGpio),
@ -14,10 +14,10 @@ RwHandler::RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCooki
statusSet(this), statusSet(this),
lastResetStatusSet(this), lastResetStatusSet(this),
tmDataset(this) { tmDataset(this) {
if (comCookie == NULL) { if (comCookie == nullptr) {
sif::error << "RwHandler: Invalid com cookie" << std::endl; sif::error << "RwHandler: Invalid com cookie" << std::endl;
} }
if (gpioComIF == NULL) { if (gpioComIF == nullptr) {
sif::error << "RwHandler: Invalid gpio communication interface" << std::endl; sif::error << "RwHandler: Invalid gpio communication interface" << std::endl;
} }
} }

View File

@ -2,10 +2,12 @@
#define MISSION_DEVICES_RWHANDLER_H_ #define MISSION_DEVICES_RWHANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h> #include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h> #include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <mission/devices/devicedefinitions/RwDefinitions.h> #include <mission/devices/devicedefinitions/RwDefinitions.h>
#include <string.h> #include <string.h>
class GpioIF;
/** /**
* @brief This is the device handler for the reaction wheel from nano avionics. * @brief This is the device handler for the reaction wheel from nano avionics.
* *
@ -28,7 +30,7 @@ class RwHandler : public DeviceHandlerBase {
* @param enablePin GPIO connected to the enable pin of the reaction wheels. Must be pulled * @param enablePin GPIO connected to the enable pin of the reaction wheels. Must be pulled
* to high to enable the device. * to high to enable the device.
*/ */
RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, LinuxLibgpioIF* gpioComIF, RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, GpioIF* gpioComIF,
gpioId_t enableGpio); gpioId_t enableGpio);
virtual ~RwHandler(); virtual ~RwHandler();
@ -84,7 +86,7 @@ class RwHandler : public DeviceHandlerBase {
//! [EXPORT] : [COMMENT] Reaction wheel signals an error state //! [EXPORT] : [COMMENT] Reaction wheel signals an error state
static const Event ERROR_STATE = MAKE_EVENT(1, severity::HIGH); static const Event ERROR_STATE = MAKE_EVENT(1, severity::HIGH);
LinuxLibgpioIF* gpioComIF = nullptr; GpioIF* gpioComIF = nullptr;
gpioId_t enableGpio = gpio::NO_GPIO; gpioId_t enableGpio = gpio::NO_GPIO;
RwDefinitions::TemperatureSet temperatureSet; RwDefinitions::TemperatureSet temperatureSet;