projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f0161e
)
common: Synchronize sector headers after a recording is finished.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Thu, 9 Jan 2020 10:02:21 +0000
(11:02 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Thu, 9 Jan 2020 14:19:36 +0000
(15:19 +0100)
This is necessary to be able to retrieve the recording without
restarting the device.
src/common/logger.rs
patch
|
blob
|
history
diff --git
a/src/common/logger.rs
b/src/common/logger.rs
index d958193c281d97205b694bd333a5adee51998ec5..d83d2391bfe1a6261dc2bb312e2a6a288d26ba16 100644
(file)
--- a/
src/common/logger.rs
+++ b/
src/common/logger.rs
@@
-421,7
+421,13
@@
impl<'a> Logger<'a> {
self.storage.write(this_sector as usize * SECTOR_SIZE,
&self.write_buffer);
- self.sectors_written + 1
+ self.sectors_written += 1;
+
+ for i in 0..self.sectors_written {
+ self.read_sector_header((self.first_sector + i) as usize);
+ }
+
+ self.sectors_written
}
fn sector_header_iter(&self) -> SectorHeaderIter {