mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
HAL_ChibiOS: fixed bitmask error on storage erase
This commit is contained in:
parent
bff97eb150
commit
27c114828b
@ -131,7 +131,10 @@ void Storage::_save_backup(void)
|
||||
*/
|
||||
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>>CH_STORAGE_LINE_SHIFT;
|
||||
line <= end>>CH_STORAGE_LINE_SHIFT;
|
||||
line++) {
|
||||
|
Loading…
Reference in New Issue
Block a user