Skip to content

Commit 759ffa2

Browse files
committed
pbio/sys/storage: Keep user data in same place.
By keeping it in the same place as the releases that introduced these features, we have a simpler upgrade path and better compatability with older versions.
1 parent a137834 commit 759ffa2

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
## [Unreleased]
66

7+
### Fixed
8+
- Fixed persistent data not being deleted when swapping
9+
from `3.6.0b1` to `3.5.0` and back to `3.6.0b1` ([support#1846]).
10+
11+
[support#1846]: https://github.com/pybricks/support/issues/1846
12+
713
## [3.6.0b1] - 2024-09-24
814

915
### Added

lib/pbio/sys/storage.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ typedef struct {
6565
*/
6666
volatile uint32_t checksum_complement;
6767
#endif
68+
/**
69+
* End-user read-write accessible data. Everything after this is also
70+
* user-readable but not writable.
71+
*/
72+
uint8_t user_data[PBSYS_CONFIG_STORAGE_USER_DATA_SIZE];
6873
/**
6974
* First 8 symbols of the git hash of the firmware version used to create
7075
* this data map. If this does not match the version of the running
7176
* firmware, user data will be reset to 0.
7277
*/
7378
char stored_firmware_hash[8];
74-
/**
75-
* End-user read-write accessible data. Everything after this is also
76-
* user-readable but not writable.
77-
*/
78-
uint8_t user_data[PBSYS_CONFIG_STORAGE_USER_DATA_SIZE];
7979
/**
8080
* System settings. Settings will be reset to defaults when the firmware
8181
* version changes due to an update.

0 commit comments

Comments
 (0)