AP_Scripting: add file system crc32 binding

This commit is contained in:
Andrew Tridgell 2024-03-13 13:17:47 +11:00 committed by Randy Mackay
parent f8767d6443
commit da052f4a10
2 changed files with 17 additions and 0 deletions

View File

@ -3396,6 +3396,18 @@ fs = {}
---@return stat_t_ud|nil
function fs:stat(param1) end
-- Format the SD card. This is a async operation, use get_format_status to get the status of the format
---@return boolean
function fs:format() end
-- Get the current status of a format. 0=NOT_STARTED, 1=PENDING, 2=IN_PROGRESS, 3=SUCCESS, 4=FAILURE
---@return number
function fs:get_format_status() end
-- Get crc32 checksum of a file with given name
---@return uint32_t_ud|nil
function fs:crc32(file_name) end
-- desc
---@class networking
networking = {}

View File

@ -891,6 +891,11 @@ userdata AP_Filesystem::stat_t method is_directory boolean
singleton AP_Filesystem rename fs
singleton AP_Filesystem method stat boolean string AP_Filesystem::stat_t'Null
singleton AP_Filesystem method format boolean
singleton AP_Filesystem method format depends AP_FILESYSTEM_FORMAT_ENABLED
singleton AP_Filesystem method get_format_status uint8_t'skip_check
singleton AP_Filesystem method get_format_status depends AP_FILESYSTEM_FORMAT_ENABLED
singleton AP_Filesystem method crc32 boolean string uint32_t'Null
include AP_RTC/AP_RTC.h depends AP_RTC_ENABLED
include AP_RTC/AP_RTC_config.h