mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
adding the timestamp logging
This commit is contained in:
parent
e695af2100
commit
4bf11ca06b
@ -1943,6 +1943,7 @@ int sdlog2_thread_main(int argc, char *argv[])
|
||||
/* --- CAMERA TRIGGER --- */
|
||||
if (copy_if_updated(ORB_ID(camera_trigger), &subs.cam_trig_sub, &buf.camera_trigger)) {
|
||||
log_msg.msg_type = LOG_CAMT_MSG;
|
||||
log_msg.body.log_CAMT.timestamp = buf.camera_trigger.timestamp;
|
||||
log_msg.body.log_CAMT.seq = buf.camera_trigger.seq;
|
||||
LOGBUFFER_WRITE_AND_COUNT(CAMT);
|
||||
}
|
||||
|
||||
@ -511,6 +511,7 @@ struct log_CTS_s {
|
||||
/* --- CAMERA TRIGGER --- */
|
||||
#define LOG_CAMT_MSG 48
|
||||
struct log_CAMT_s {
|
||||
uint64_t timestamp;
|
||||
uint32_t seq;
|
||||
};
|
||||
|
||||
@ -591,7 +592,7 @@ static const struct log_format_s log_formats[] = {
|
||||
LOG_FORMAT(ENCD, "qfqf", "cnt0,vel0,cnt1,vel1"),
|
||||
LOG_FORMAT(TSYN, "Q", "TimeOffset"),
|
||||
LOG_FORMAT(MACS, "fff", "RRint,PRint,YRint"),
|
||||
LOG_FORMAT(CAMT, "I", "seq"),
|
||||
LOG_FORMAT(CAMT, "QI", "timestamp,seq"),
|
||||
|
||||
/* system-level messages, ID >= 0x80 */
|
||||
/* FMT: don't write format of format message, it's useless */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user