Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Tridgell a241b13f45 AP_Filesystem: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Thomas Watson 0ca37387be AP_Filesystem: guarantee load_file() data is null-terminated
Improves safety of use and clarity of users. Termination is not
included in the reported size to avoid changing user behavior or
misrepresenting the file contents.
2024-05-04 10:15:44 +10:00
Peter Barker 2cb5f434fd AP_Filesystem: don't show directory entries for empty @ filesystems 2024-02-28 18:47:22 +11:00
Peter Barker ac769014c4 AP_Filesystem: list virtual @SYS, @MISSION etc directories in /
Adds virtual directory entries for these virtual filesystems in /

RTL> ftp list
RTL> Listing /
 D @MISSION
 D @PARAM
 D @ROMFS
 D @SYS
 D APM
 D log
   V5_BT.dfu	10541
   bootlog.txt	297
   dataman	350216
   message-intervals-chan0.txt	7
Total size 352.60 kByte
ftp list @MISSION
RTL> Listing @MISSION
LIST: OP seq:7 sess:2 opcode:129 req_opcode:3 size:2 bc:0 ofs:0 plen=2 [2]
ftp list @ROMFS
RTL> Listing @ROMFS
   bootloader.bin	16448
   hwdef.dat	5743
   io_firmware.bin	40880
Total size 61.59 kByte

This PR also makes us *much* more lenient in what we accept for looking at virtual filesystems, so

ftp list @SYS
ftp list /@SYS
ftp list @SYS/
ftp list /@SYS/

should all work
2024-02-27 10:07:01 +11:00
Iampete1 93d8de2834 AP_Filesystem: support full direcotry listing in ROMFS 2024-02-22 07:43:16 +11:00
Iampete1 c48759f4ba AP_Filesystem: crc32: Ensure checksum value is initialized 2024-02-15 07:36:39 +11:00
Andrew Tridgell 9beea49c3c AP_Filesystem: implement stat() call for lua 2023-12-11 18:00:38 +11:00
Iampete1 2c7e06dc5e AP_Filesystem: add crc 32 method 2023-12-05 11:03:58 +11:00
Peter Barker 6faa77993a AP_Filesystem: correct include problem
transitive include may fail depending on build options
2023-06-18 10:35:27 +10:00
Peter Barker 294b975335 AP_Filesystem: correct detection of feature AP_FILESYSTEM_FORMAT_ENABLED 2023-06-08 08:55:26 +10:00
Andrew Tridgell 4946ce5431 HAL_ChibiOS: revert recent USB changes
these are causing some boards to crash on startup. Tested with a
QiotekZealotH743 which doesn't get out of setup_usb_strings()

once we have debugged this we can re-add the functionality
2023-06-03 16:50:30 +10:00
bugobliterator 414606ba31 AP_Filesystem: add support for blocking filesystem access 2023-05-31 18:40:17 +10:00
Peter Barker 1c54d18672 AP_Filesystem: replace HAVE_FILESYSTEM_SUPPORT with backend defines 2023-05-17 09:40:39 +10:00
Andrew Tridgell cf79843661 AP_Filesystem: support file rename 2023-03-05 09:42:48 +11:00
Peter Barker d633bd3f49 AP_Filesystem: add in-progress to formatsdcard process 2023-02-21 17:07:41 +11:00
Peter Barker b5165b6d7f AP_FileSystem: add AP_FILESYSTEM_*_ENABLED 2022-09-15 10:53:02 +10:00
Peter Barker 936fef11e2 AP_Filesystem: rename HAL_MISSION_ENABLED to AP_MISSION_ENABLED 2022-08-18 22:49:10 +10:00
Willian Galvani 0e62d561d9 AP_Filesystem: add allow_absolute_paths to open(), implement it for posix backend 2022-03-22 10:19:21 +11:00
Willian Galvani 802974a337 AP_Filesystem: tweak fgets()
This avoids that it returns False when encountering new lines or
\n\r
2022-02-01 17:35:26 +11:00
Andrew Tridgell 7c57e1521c AP_Filesystem: support formatting of SDcard on ChibiOS 2021-12-28 16:04:57 +11:00
Buzz 7c893d7cc9 AP_Filesystem: add ESP32 support
Author: Charles Villard <charlesvillard10@gmail.com>
Author: Buzz <davidbuzz@gmail.com>
2021-11-01 17:40:31 +11:00
Peter Barker df7b2982d3 AP_Filesystem: add fgets 2021-09-30 10:31:03 +10:00
Peter Barker c11a6bbb47 AP_Filesystem: add support for AP_Logger into AP_Periph 2021-06-08 09:57:55 +10:00
Andrew Tridgell e055165eb8 AP_Filesystem: added download of mission/fence/rally 2021-04-21 07:12:55 +10:00
Andrew Tridgell 773517a473 AP_Filesystem: added load_file() API
this makes it very easy to load a small file from sdcard or ROMFS
2020-11-18 09:11:36 +11:00
bugobliterator bf4f482f5e AP_FileSystem: do listing for SYS without slash as well 2020-11-12 08:42:44 +11:00
Andrew Tridgell e429d578fa AP_Filesystem: added interface for mount/unmount
we need to hold the FATFS semaphore when doing mount/unmount, which
means we must go via AP_Filesystem_FATFS
2020-10-27 10:45:03 +11:00
Andrew Tridgell 9b14fa7ed9 AP_Filesystem: enable @PARAM, @ROMFS and @SYS with no microSD 2020-04-29 07:36:55 +10:00
Andrew Tridgell cd3b4dcc7d AP_Filesystem: added @SYS filesystem backend 2020-04-29 07:36:55 +10:00
Andrew Tridgell 67fc23d01b AP_Filesystem: support downloading parameters via ftp
adds @PARAM/param.pck as a packed file of all parameters
2020-04-29 07:36:55 +10:00
Andrew Tridgell 10c709a5a1 AP_Filesystem: use @ROMFS 2020-03-28 15:28:03 +11:00
Andrew Tridgell 6583f7c13e AP_Filesystem: added VFS system for multiple backends 2020-03-28 15:28:03 +11:00
Andrew Tridgell 692abb11fa AP_Filesystem: define new filesystem API 2019-08-27 15:40:43 +10:00