mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
HAL_Linux: fixed bitmask error on storage erase
This commit is contained in:
parent
27c114828b
commit
cbbf61af93
@ -183,7 +183,10 @@ void Storage::init()
|
|||||||
*/
|
*/
|
||||||
void Storage::_mark_dirty(uint16_t loc, uint16_t length)
|
void Storage::_mark_dirty(uint16_t loc, uint16_t length)
|
||||||
{
|
{
|
||||||
uint16_t end = loc + length;
|
if (length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uint16_t end = loc + length - 1;
|
||||||
for (uint8_t line=loc>>LINUX_STORAGE_LINE_SHIFT;
|
for (uint8_t line=loc>>LINUX_STORAGE_LINE_SHIFT;
|
||||||
line <= end>>LINUX_STORAGE_LINE_SHIFT;
|
line <= end>>LINUX_STORAGE_LINE_SHIFT;
|
||||||
line++) {
|
line++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user