Skip to content

Commit ab4527b

Browse files
authored
Merge pull request #306 from mcci-catena/issue304
FRAM bug fix and debug improvements.
2 parents dcac894 + 39ee5f5 commit ab4527b

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/CatenaBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Copyright notice:
5757
(((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local))
5858

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

6262
#define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \
6363
(((v) >> 24u) & 0xFFu)

src/Catena_Fram.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,22 @@ class cFram::Cursor
280280
return cFramStorage::StandardKeys(this->m_uKey);
281281
}
282282

283+
/// \brief return cursor's internal value of object size.
284+
uint16_t getSavedSize() const { return this->m_uSize; }
285+
/// \brief return cursor's internal value of object key.
286+
uint8_t getSavedKey() const { return this->m_uKey; }
287+
/// \brief return cursor's internal value of object version
288+
uint8_t getSavedVer() const { return this->m_uVer; }
289+
/// \brief return cursor's internal value of object location
290+
uint32_t getSavedOffset() const { return this->m_offset; }
291+
283292
private:
284293
cFramStorage::StandardItem getItem()
285294
{
286295
return cFramStorage::vItemDefs[this->m_uKey];
287296
};
288297

298+
protected:
289299
cFram *m_pFram;
290300
uint16_t m_uSize;
291301
uint8_t m_uKey;

src/lib/Catena_Fram.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ McciCatena::cFram::reset()
489489
);
490490

491491
// finally, verify that the result looks good.
492+
this->invalidate();
493+
492494
return this->isValid();
493495
}
494496

0 commit comments

Comments
 (0)