mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 14:08:45 -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)
|
||||
{
|
||||
uint16_t end = loc + length;
|
||||
while (loc < end) {
|
||||
uint8_t line = (loc >> VRBRAIN_STORAGE_LINE_SHIFT);
|
||||
_dirty_mask |= 1 << line;
|
||||
loc += VRBRAIN_STORAGE_LINE_SIZE;
|
||||
for (uint8_t line=loc>>VRBRAIN_STORAGE_LINE_SHIFT;
|
||||
line <= end>>VRBRAIN_STORAGE_LINE_SHIFT;
|
||||
line++) {
|
||||
_dirty_mask |= 1U << line;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user