Logging custom messages invalid time axis

Hi all,

I’ve added a few custom log messages using the AP::logger().Write(…) methods, and everything seems to get logged correctly except for the time axis. When reviewing a log in mission planner, if I check the “Time” checkbox, all of my custom log messages get plotted with the same timestamp and display as a vertical line. If I plot without the “Time” checkbox, it looks correct, but obviously I’m missing the time now.

I’m currently plotting them directly from message callbacks within AP_UAVCAN.cpp as the messages are sent across as uavcan messages.

Any ideas why the log time isn’t getting set correctly?
Thanks.



To solve my own problem, the AP_HAL::micros64() field must be named “TimeUS”. I tried to shorten this “Time” to fit within the 64 character limit which was causing my problems.

Not sure if this is the place to request a doc update, but this page Adding a new Log Message — Dev documentation should definitely mention this.