Skip to content

FRAM bug fix and debug improvements. #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CatenaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Copyright notice:
(((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local))

#define CATENA_ARDUINO_PLATFORM_VERSION \
CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 21, 1, 1) /* v0.21.1-1 */
CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 21, 1, 2) /* v0.21.1-2 */

#define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \
(((v) >> 24u) & 0xFFu)
Expand Down
10 changes: 10 additions & 0 deletions src/Catena_Fram.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,22 @@ class cFram::Cursor
return cFramStorage::StandardKeys(this->m_uKey);
}

/// \brief return cursor's internal value of object size.
uint16_t getSavedSize() const { return this->m_uSize; }
/// \brief return cursor's internal value of object key.
uint8_t getSavedKey() const { return this->m_uKey; }
/// \brief return cursor's internal value of object version
uint8_t getSavedVer() const { return this->m_uVer; }
/// \brief return cursor's internal value of object location
uint32_t getSavedOffset() const { return this->m_offset; }

private:
cFramStorage::StandardItem getItem()
{
return cFramStorage::vItemDefs[this->m_uKey];
};

protected:
cFram *m_pFram;
uint16_t m_uSize;
uint8_t m_uKey;
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Catena_Fram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ McciCatena::cFram::reset()
);

// finally, verify that the result looks good.
this->invalidate();

return this->isValid();
}

Expand Down