11 #if CONFIG_HAL_BOARD == HAL_BOARD_F4LIGHT && (defined(BOARD_SDCARD_NAME) || defined(BOARD_DATAFLASH_FATFS)) 24 const char *log_directory);
45 int16_t
get_log_data(uint16_t
log_num, uint16_t page, uint32_t offset, uint16_t len, uint8_t *data);
69 uint16_t _read_fd_log_num;
70 uint32_t _read_offset;
71 uint32_t _write_offset;
72 volatile bool _open_error;
73 const char *_log_directory;
75 uint32_t _io_timer_heartbeat;
76 bool io_thread_alive()
const;
78 uint16_t _cached_oldest_log;
79 uint16_t _last_oldest_log;
84 bool ReadBlock(
void *pkt, uint16_t size)
override;
86 uint16_t _log_num_from_list_entry(
const uint16_t list_entry);
90 uint16_t find_oldest_log();
92 bool file_exists(
const char *filename)
const;
93 bool log_exists(
const uint16_t lognum)
const;
95 const float min_avail_space_percent = 10.0f;
99 const uint16_t _writebuf_chunk;
100 uint32_t _last_write_time;
103 char *_log_file_name(
const uint16_t
log_num)
const;
104 char *_lastlog_file_name()
const;
105 uint32_t _get_log_size(
const uint16_t
log_num)
const;
106 uint32_t _get_log_time(
const uint16_t
log_num)
const;
110 void _io_timer(
void);
112 uint32_t critical_message_reserved_space()
const {
121 uint32_t non_messagewriter_message_reserved_space()
const {
133 float avail_space_percent(uint32_t *
free =
NULL);
139 #define Daysto32(year, mon) (((year - 1) / 4) + MONTAB(year)[mon]) 143 static uint32_t to_timestamp(
const struct tm *t);
virtual void stop_logging(void)=0
virtual bool CardInserted(void) const =0
virtual bool StartNewLogOK() const
virtual void get_log_boundaries(uint16_t log_num, uint16_t &start_page, uint16_t &end_page)=0
uint32_t get_size(void) const
virtual void vehicle_was_disarmed()
virtual int16_t get_log_data(uint16_t log_num, uint16_t page, uint32_t offset, uint16_t len, uint8_t *data)=0
virtual bool _WritePrioritisedBlock(const void *pBuffer, uint16_t size, bool is_critical)=0
virtual bool WritesOK() const =0
virtual uint16_t find_last_log()=0
virtual void EraseAll()=0
virtual void periodic_fullrate(const uint32_t now)
virtual bool logging_enabled() const =0
virtual bool logging_failed() const =0
virtual uint16_t get_num_logs()=0
virtual void periodic_1Hz(const uint32_t now)
virtual uint32_t bufferspace_available()=0
virtual void PrepForArming()
virtual uint16_t start_new_log(void)=0
virtual bool NeedPrep()=0
virtual void get_log_info(uint16_t log_num, uint32_t &size, uint32_t &time_utc)=0
virtual bool logging_started(void) const =0
virtual bool ReadBlock(void *pkt, uint16_t size)=0