mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-09 01:13:57 -04:00
HAL_VRBRAIN: fixed storage bug in VRBRAIN too
This commit is contained in:
parent
d24159204e
commit
939df78a2f
@ -177,10 +177,10 @@ void VRBRAINStorage::_storage_open(void)
|
|||||||
void VRBRAINStorage::_mark_dirty(uint16_t loc, uint16_t length)
|
void VRBRAINStorage::_mark_dirty(uint16_t loc, uint16_t length)
|
||||||
{
|
{
|
||||||
uint16_t end = loc + length;
|
uint16_t end = loc + length;
|
||||||
while (loc < end) {
|
for (uint8_t line=loc>>VRBRAIN_STORAGE_LINE_SHIFT;
|
||||||
uint8_t line = (loc >> VRBRAIN_STORAGE_LINE_SHIFT);
|
line <= end>>VRBRAIN_STORAGE_LINE_SHIFT;
|
||||||
_dirty_mask |= 1 << line;
|
line++) {
|
||||||
loc += VRBRAIN_STORAGE_LINE_SIZE;
|
_dirty_mask |= 1U << line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user