mirror of https://github.com/ArduPilot/ardupilot
HAL_SITL: fixed bitmask error on storage erase
This commit is contained in:
parent
e89750bb41
commit
fbf68c860b
|
@ -69,7 +69,10 @@ void Storage::_storage_open(void)
|
||||||
*/
|
*/
|
||||||
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 (uint16_t line=loc>>STORAGE_LINE_SHIFT;
|
for (uint16_t line=loc>>STORAGE_LINE_SHIFT;
|
||||||
line <= end>>STORAGE_LINE_SHIFT;
|
line <= end>>STORAGE_LINE_SHIFT;
|
||||||
line++) {
|
line++) {
|
||||||
|
|
Loading…
Reference in New Issue