mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
HAL_ChibiOS: fixed bitmask error on storage erase
This commit is contained in:
parent
4edab03651
commit
08f00d6a40
@ -130,7 +130,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