Update FSFW from Upstream #27

Merged
muellerr merged 523 commits from mueller/update-from-upstream into develop 2022-05-17 10:06:59 +02:00
9 changed files with 50 additions and 56 deletions
Showing only changes of commit b32d1da421 - Show all commits

View File

@ -1,8 +1,8 @@
#include "DummyPowerSwitcher.h" #include "DummyPowerSwitcher.h"
DummyPowerSwitcher::DummyPowerSwitcher(size_t numberOfSwitches, size_t numberOfFuses, uint32_t switchDelayMs) DummyPowerSwitcher::DummyPowerSwitcher(size_t numberOfSwitches, size_t numberOfFuses,
: switcherList(numberOfSwitches), fuseList(numberOfFuses), switchDelayMs(switchDelayMs) { uint32_t switchDelayMs)
} : switcherList(numberOfSwitches), fuseList(numberOfFuses), switchDelayMs(switchDelayMs) {}
void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) { void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) {
this->switcherList = switcherList; this->switcherList = switcherList;
@ -33,10 +33,6 @@ ReturnValue_t DummyPowerSwitcher::getSwitchState(power::Switch_t switchNr) const
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
ReturnValue_t DummyPowerSwitcher::getFuseState(uint8_t fuseNr) const { ReturnValue_t DummyPowerSwitcher::getFuseState(uint8_t fuseNr) const { return RETURN_OK; }
return RETURN_OK;
}
uint32_t DummyPowerSwitcher::getSwitchDelayMs(void) const { uint32_t DummyPowerSwitcher::getSwitchDelayMs(void) const { return 5000; }
return 5000;
}

View File

@ -1,12 +1,12 @@
#ifndef FSFW_SRC_FSFW_POWER_DUMMYPOWERSWITCHER_H_ #ifndef FSFW_SRC_FSFW_POWER_DUMMYPOWERSWITCHER_H_
#define FSFW_SRC_FSFW_POWER_DUMMYPOWERSWITCHER_H_ #define FSFW_SRC_FSFW_POWER_DUMMYPOWERSWITCHER_H_
#include <cstddef>
#include <vector>
#include "PowerSwitchIF.h" #include "PowerSwitchIF.h"
#include "definitions.h" #include "definitions.h"
#include <vector>
#include <cstddef>
class DummyPowerSwitcher : public PowerSwitchIF { class DummyPowerSwitcher : public PowerSwitchIF {
public: public:
DummyPowerSwitcher(size_t numberOfSwitches, size_t numberOfFuses, uint32_t switchDelayMs = 5000); DummyPowerSwitcher(size_t numberOfSwitches, size_t numberOfFuses, uint32_t switchDelayMs = 5000);
@ -26,6 +26,4 @@ private:
uint32_t switchDelayMs = 5000; uint32_t switchDelayMs = 5000;
}; };
#endif /* FSFW_SRC_FSFW_POWER_DUMMYPOWERSWITCHER_H_ */ #endif /* FSFW_SRC_FSFW_POWER_DUMMYPOWERSWITCHER_H_ */

View File

@ -15,9 +15,8 @@ PowerSensor::PowerSensor(object_id_t objectId, sid_t setId, VariableIds ids, Def
limits.currentMin, limits.currentMax, events.currentLow, events.currentHigh), limits.currentMin, limits.currentMax, events.currentLow, events.currentHigh),
voltageLimit(objectId, MODULE_ID_VOLTAGE, ids.pidVoltage, confirmationCount, voltageLimit(objectId, MODULE_ID_VOLTAGE, ids.pidVoltage, confirmationCount,
limits.voltageMin, limits.voltageMax, events.voltageLow, events.voltageHigh) { limits.voltageMin, limits.voltageMax, events.voltageLow, events.voltageHigh) {
auto mqArgs = MqArgs(objectId, static_cast<void*>(this)); commandQueue =
commandQueue = QueueFactory::instance()->createMessageQueue( QueueFactory::instance()->createMessageQueue(3, MessageQueueMessage::MAX_MESSAGE_SIZE);
3, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
} }
PowerSensor::~PowerSensor() { QueueFactory::instance()->deleteMessageQueue(commandQueue); } PowerSensor::~PowerSensor() { QueueFactory::instance()->deleteMessageQueue(commandQueue); }

View File

@ -1,9 +1,9 @@
#ifndef FSFW_POWER_POWERSWITCHIF_H_ #ifndef FSFW_POWER_POWERSWITCHIF_H_
#define FSFW_POWER_POWERSWITCHIF_H_ #define FSFW_POWER_POWERSWITCHIF_H_
#include "definitions.h"
#include "../events/Event.h" #include "../events/Event.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "definitions.h"
/** /**
* *
* @brief This interface defines a connection to a device that is capable of * @brief This interface defines a connection to a device that is capable of

View File

@ -1,6 +1,6 @@
#include "definitions.h"
#include "fsfw/power/PowerSwitcher.h" #include "fsfw/power/PowerSwitcher.h"
#include "definitions.h"
#include "fsfw/objectmanager/ObjectManager.h" #include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/ServiceInterface.h"

View File

@ -8,6 +8,6 @@ namespace power {
using Switch_t = uint8_t; using Switch_t = uint8_t;
static constexpr Switch_t NO_SWITCH = 0xFF; static constexpr Switch_t NO_SWITCH = 0xFF;
} } // namespace power
#endif /* FSFW_SRC_FSFW_POWER_DEFINITIONS_H_ */ #endif /* FSFW_SRC_FSFW_POWER_DEFINITIONS_H_ */

View File

@ -1,8 +1,9 @@
#include "version.h" #include "version.h"
#include "fsfw/FSFWVersion.h"
#include <cstdio> #include <cstdio>
#include "fsfw/FSFWVersion.h"
#ifdef major #ifdef major
#undef major #undef major
#endif #endif