1
0
mirror of https://github.com/CovidBraceletPrj/CovidBracelet.git synced 2024-11-11 14:08:52 +01:00
Commit Graph

119 Commits

Author SHA1 Message Date
Patrick Rathje
0272d9316b Record Binary Search Refactoring 2021-05-25 20:22:19 +02:00
Patrick Rathje
2dc75526bb Revert "Revert "Use development platformio version""
This reverts commit d6c7dc7f25.
2021-05-25 18:25:43 +02:00
Patrick Rathje
d6c7dc7f25 Revert "Use development platformio version"
This reverts commit 3bb569ccf4.
2021-05-25 18:08:10 +02:00
Patrick Rathje
a87c8928c2 Update src/ens/sequencenumber.c
Support equal values of older and newer
2021-05-25 18:06:15 +02:00
H1ghBre4k3r
bb6be05d53 Records: Rewrite interator_init_timerange and binary_search to take care of invalid entries etc. 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
4f1f5b6eab SN: Finish impl of sn_get_middle_sn to cover case of older > newer 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
b96fc5ec50 Config: Introduce CONFIG_ENS_MAX_CONTACTS as possibility to configure the max amount of contacts stored in flash 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
70168608a5 ENS_FS: Fix wrong bitmask 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
fde55d947e Add TODOs for refactoring according to PR review and refactor ens_fs_write to return error, if entry is not only ones 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
594035ed77 Config: Move parameters for MX25R64 into platformio.ini file 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
873c84ae7f ENS_FS: Fix all wrong usages of fs->entry_size 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
b90c8d7ec6 ENS_FS: Only copy memory if read entry is valid 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
796cf0f089 Fix multiple results of the PR:
- cleanup of sequence number utilites
- dynamic calculation of nvs sectors for fs information
- usage of buffer in ens_fs
- check for max entry size (page size)
- usage of interal entry size, which is always the next larger power of 2 to a given entry size
2021-05-25 18:06:15 +02:00
H1ghBre4k3r
3abbc61757 Storage: Add 3 byte for metadata to record_t and use it in initialization for ens_fs 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
a9e7c6354d Prj-Conf: Remove already defined config parameters 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
ece832fbff Storage: Use correct datatypes for storage information 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
e36bfa751a Storage: Adjust record_information correctly when erasing pages and deleting contacts 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
970a42aea8 Use record instead of contact as naming convention 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
36ad239a87 Storage: Remove comment in load_contact 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
b3a2a6919b Sequence Numbers: Introduce GET_MASKED_SN macro 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
30615a895d Records: In init_range, set finished to false, if there are contacts 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
33f64b1caa Records: In iterator_clear, also set sequence numbers to 0 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
f0762bf1dd Records: In iterator_next, use memcpy to next contact 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
0f2307e668 Records: In iterator_next, combine if-guard with while-loop 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
dd2f0a1265 Records: In init_timerange, use init_range after finding start and end sn 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
6b6a40d383 Use lock for ens_fs 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
b729d794bf Apply suggestions for ens_fs 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
96eef185c9 Apply suggestions for covid.c 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
0b681c6d28 Use environment extension for platformio.ini 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
c428971599 Remove unneeded text file 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
534a61c471 Add locks for the storage 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
80cba23823 Format ens files and add .clang-format file 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
522a2aab9d Use binary search in init_timerange 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
aa17d584b3 Implement ens_records_iterator_init_timerange via binary search 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
9e52f3c3c4 Fix incompatible pointer in ens_fs and comment unneeded variables out 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
1101dd950f Remove unneeded contacts code and cleanup gatt-service.h 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
b2d89d5d03 Implement error codes and use them throughout ens_fs 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
c8607507b7 Use record_t for storing contacts 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
9ae226d50b Implement correct read using crc and deleted flag and implement deletion 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
ca35b6a82c Delete page before incrementing sn 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
bf9ad9cbec Store CRC and 'not-deleted' flag in last byte of each entry 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
c4f035246b Store contacts in ens_fs 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
30dc3c31eb Init ens_fs in storage.c 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
725259cfce Use NVS to store storage information 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
68ed7371cc Rename storage partition 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
cfa29284a3 Move sequence-number utils to ens folder aswell 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
d38996a021 Implement ens_fs and move ens stuff to ens directory 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
f367e22db6 Automatically increment sequence number 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
da234280b8 Add mutex for entire NVS 2021-05-25 18:06:15 +02:00
H1ghBre4k3r
b8eb13f634 Increase NVS to 192 sectors, 16.384 byte each 2021-05-25 18:06:15 +02:00