logger: add free space check (need at least 50MB to start)

This commit is contained in:
Beat Küng
2016-05-14 11:27:07 +02:00
committed by Lorenz Meier
parent 501544520f
commit fc51f81bf5
2 changed files with 47 additions and 0 deletions
+7
View File
@@ -107,6 +107,12 @@ private:
*/
int get_log_file_name(char *file_name, size_t file_name_size);
/**
* Check if there is enough free space left on the SD Card
* @return 0 on success, 1 if not enough space, <0 on error
*/
int check_free_space();
void start_log();
void stop_log();
@@ -164,6 +170,7 @@ private:
LogWriter _writer;
uint32_t _log_interval;
param_t _log_utc_offset;
orb_advert_t _mavlink_log_pub = nullptr;
};
Logger *logger_ptr = nullptr;