diff --git a/CHANGELOG.md b/CHANGELOG.md index 968608a2..7360d8a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Fixes +- FreshDeviceHandlerBase did not initialize the fdirInstance - The `PusTmCreator` API only accepted 255 bytes of source data. It can now accept source data with a size limited only by the size of `size_t`. - Important bugfix in CFDP PDU header format: The entity length field and the transaction sequence diff --git a/src/fsfw/container/SharedRingBuffer.cpp b/src/fsfw/container/SharedRingBuffer.cpp index 4be9c09f..88003e2e 100644 --- a/src/fsfw/container/SharedRingBuffer.cpp +++ b/src/fsfw/container/SharedRingBuffer.cpp @@ -52,14 +52,15 @@ DynamicFIFO* SharedRingBuffer::getReceiveSizesFifo() { return receiveSizesFifo; } - ReturnValue_t SharedRingBuffer::fifoEmpty(bool& empty, MutexIF::TimeoutType timeoutType, uint32_t timeoutMs) { - if(receiveSizesFifo == nullptr) { - return returnvalue::FAILED; - } - MutexGuard mg(mutex, timeoutType, timeoutMs); - if(mg.getLockResult() != returnvalue::OK) { - return mg.getLockResult(); - } - empty = receiveSizesFifo->empty(); - return returnvalue::OK; - } \ No newline at end of file +ReturnValue_t SharedRingBuffer::fifoEmpty(bool& empty, MutexIF::TimeoutType timeoutType, + uint32_t timeoutMs) { + if (receiveSizesFifo == nullptr) { + return returnvalue::FAILED; + } + MutexGuard mg(mutex, timeoutType, timeoutMs); + if (mg.getLockResult() != returnvalue::OK) { + return mg.getLockResult(); + } + empty = receiveSizesFifo->empty(); + return returnvalue::OK; +} \ No newline at end of file diff --git a/src/fsfw/container/SharedRingBuffer.h b/src/fsfw/container/SharedRingBuffer.h index 828d58ad..532031b5 100644 --- a/src/fsfw/container/SharedRingBuffer.h +++ b/src/fsfw/container/SharedRingBuffer.h @@ -20,7 +20,7 @@ class SharedRingBuffer : public SystemObject, public SimpleRingBuffer { * This constructor allocates a new internal buffer with the supplied size. * @param size * @param overwriteOld - * If the ring buffer is overflowing at a write operartion, the oldest data + * If the ring buffer is overflowing at a write operation, the oldest data * will be overwritten. */ SharedRingBuffer(object_id_t objectId, const size_t size, bool overwriteOld, @@ -30,7 +30,7 @@ class SharedRingBuffer : public SystemObject, public SimpleRingBuffer { * @param buffer * @param size * @param overwriteOld - * If the ring buffer is overflowing at a write operartion, the oldest data + * If the ring buffer is overflowing at a write operation, the oldest data * will be overwritten. */ SharedRingBuffer(object_id_t objectId, uint8_t* buffer, const size_t size, bool overwriteOld, diff --git a/src/fsfw/devicehandlers/FreshDeviceHandlerBase.cpp b/src/fsfw/devicehandlers/FreshDeviceHandlerBase.cpp index 2b4ab27b..1b463a37 100644 --- a/src/fsfw/devicehandlers/FreshDeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/FreshDeviceHandlerBase.cpp @@ -11,6 +11,7 @@ FreshDeviceHandlerBase::FreshDeviceHandlerBase(DhbConfig config) healthHelper(this, getObjectId()), paramHelper(this), poolManager(this, nullptr), + fdirInstance(config.fdirInstance), defaultFdirParent(config.defaultFdirParent) { auto mqArgs = MqArgs(config.objectId, static_cast(this)); messageQueue = QueueFactory::instance()->createMessageQueue( diff --git a/src/fsfw/devicehandlers/FreshDeviceHandlerBase.h b/src/fsfw/devicehandlers/FreshDeviceHandlerBase.h index c911c1dd..21135ab7 100644 --- a/src/fsfw/devicehandlers/FreshDeviceHandlerBase.h +++ b/src/fsfw/devicehandlers/FreshDeviceHandlerBase.h @@ -94,7 +94,7 @@ class FreshDeviceHandlerBase : public SystemObject, virtual void modeChanged(Mode_t mode, Submode_t submode); /** * The default implementation sets the new mode immediately. If this is not applicable for - * certain modes, the user should provide a custom implementation, which performs rougly + * certain modes, the user should provide a custom implementation, which performs roughly * the same functionality of this function, when all the steps have been taken to reach the * new mode. */