mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 05:58:30 -04:00
AP_Logger: support SITL implementation of littlefs
This commit is contained in:
parent
0c541b72fd
commit
49c61bc729
@ -986,7 +986,7 @@ void AP_Logger_File::io_timer(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if AP_FILESYSTEM_LITTLEFS_ENABLED
|
#if AP_FILESYSTEM_LITTLEFS_ENABLED && CONFIG_HAL_BOARD != HAL_BOARD_SITL
|
||||||
bool sync_block = AP::littlefs().sync_block(_write_fd, _write_offset, nbytes);
|
bool sync_block = AP::littlefs().sync_block(_write_fd, _write_offset, nbytes);
|
||||||
#endif // AP_FILESYSTEM_LITTLEFS_ENABLED
|
#endif // AP_FILESYSTEM_LITTLEFS_ENABLED
|
||||||
|
|
||||||
@ -1014,10 +1014,10 @@ void AP_Logger_File::io_timer(void)
|
|||||||
fsync on littlefs is extremely expensive (20% CPU on an H7) and not
|
fsync on littlefs is extremely expensive (20% CPU on an H7) and not
|
||||||
required since the whole point of the filesystem is to avoid corruption
|
required since the whole point of the filesystem is to avoid corruption
|
||||||
*/
|
*/
|
||||||
|
#if CONFIG_HAL_BOARD != HAL_BOARD_SITL && CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_NONE
|
||||||
#if AP_FILESYSTEM_LITTLEFS_ENABLED
|
#if AP_FILESYSTEM_LITTLEFS_ENABLED
|
||||||
if (sync_block)
|
if (sync_block)
|
||||||
#endif // AP_FILESYSTEM_LITTLEFS_ENABLED
|
#endif // AP_FILESYSTEM_LITTLEFS_ENABLED
|
||||||
#if CONFIG_HAL_BOARD != HAL_BOARD_SITL && CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_NONE
|
|
||||||
{
|
{
|
||||||
last_io_operation = "fsync";
|
last_io_operation = "fsync";
|
||||||
AP::FS().fsync(_write_fd);
|
AP::FS().fsync(_write_fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user