13 #define __STDC_FORMAT_MACROS 21 X(uint64_t, "%" PRIu64, loop_index ) \ 22 X(uint64_t, "%" PRIu64, last_step_ns ) \ 24 X(double, "%f", altitude_kf ) \ 25 X(double, "%f", altitude_bmp) \ 26 X(double, "%f", roll ) \ 27 X(double, "%f", pitch ) \ 28 X(double, "%f", yaw ) \ 30 X(double, "%f", Z_throttle_sp ) \ 31 X(double, "%f", altitude_sp ) \ 32 X(double, "%f", roll_sp ) \ 33 X(double, "%f", pitch_sp ) \ 34 X(double, "%f", yaw_sp ) \ 36 X(double, "%f", u_X ) \ 37 X(double, "%f", u_Y ) \ 38 X(double, "%f", u_Z ) \ 39 X(double, "%f", u_roll ) \ 40 X(double, "%f", u_pitch ) \ 41 X(double, "%f", u_yaw ) \ 43 X(double, "%f", mot_1 ) \ 44 X(double, "%f", mot_2 ) \ 45 X(double, "%f", mot_3 ) \ 46 X(double, "%f", mot_4 ) \ 47 X(double, "%f", mot_5 ) \ 48 X(double, "%f", mot_6 ) \ 49 X(double, "%f", v_batt ) 52 #define X(type, fmt, name) type name ; 101 #endif // LOG_MANAGER_H int print_entry(log_entry_t entry)
Write the contents of one entry to the console.
int log_manager_init()
creates a new csv log file and starts the background thread.
int add_log_entry(log_entry_t new_entry)
quickly add new data to local buffer
struct log_entry_t log_entry_t
int log_manager_cleanup()
Finish writing remaining data to log and close thread.