26 #define PERIODIC_C_FLIGHTRECORDER
34 #if FLIGHTRECORDER_SDLOG
37 #ifndef FLIGHTRECORDER_DEVICE
38 #define FLIGHTRECORDER_DEVICE flightrecorder_sdlog
40 #warning "SD log is activated, but FLIGHTRECORDER_DEVICE is alreay set (should not be defined)"
48 #ifndef TELEMETRY_PROCESS_FlightRecorder
49 #error "You need to use a telemetry xml file with FlightRecorder process!"
54 #if FLIGHTRECORDER_SDLOG
61 #if FLIGHTRECORDER_SDLOG
63 if (flightRecorderLogFile == -1)
return;
66 #if PERIODIC_TELEMETRY
72 uint8_t ac_id = pprzlink_get_DL_INFO_MSG_UP_ac_id(buf);
73 if(ac_id != AC_ID && ac_id != 0xFF) {
76 uint8_t fd = pprzlink_get_DL_INFO_MSG_UP_fd(buf);
78 uint8_t len = pprzlink_get_INFO_MSG_UP_msg_length(buf);
79 char*
msg = pprzlink_get_DL_INFO_MSG_UP_msg(buf);
80 pprz_msg_send_INFO_MSG(&
pprzlog_tp.trans_tx, &(FLIGHTRECORDER_DEVICE).device, AC_ID, len,
msg);
Common code for AP and FBW telemetry.
void flight_recorder_init()
Init function.
void flight_recorder_periodic()
Periodic function.
void flight_recorder_log_msg_up(uint8_t *buf)
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
struct pprzlog_transport pprzlog_tp
PPRZLOG transport structure.
Initialize pprzlog transport.
void chibios_sdlog_init(struct chibios_sdlog *sdlog, FileDes *file)
init chibios_sdlog structure
#define DEST_INFO_MSG_ALL
#define DEST_INFO_MSG_FLIGHT_RECORDER
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.