[Ovmsdev] Locations and scripts
Stephen Casner
casner at acm.org
Thu Jun 6 00:39:13 HKT 2019
Mark,
If by "unix julian time" you mean a timestamp like 1559751698 (the
time as I write this), than that is not what Greg and I have observed
in the CRTD logs. Here are the first lines in our files:
151766.574 CXX Info Type:crtd; Path:'/sd/gps.crtd'; Filter:1:100-100; Vehicle:TR2N;
383603.293 CXX Info Type:crtd; Path:'/sd/location.crtd'; Filter:1:100-100; Vehicle:TR1N;
Yet OVMS does have the current time from NTP:
OVMS# time
Time Zone:
UTC Time: 2019-06-05 16:35:45 UTC
Local Time: 2019-06-05 16:35:45 GMT
Provider: ntp
PROVIDER STRATUM UPDATE TIME
*ntp 1 57 Wed Jun 5 16:35:44 2019
Who calls candump_crtd::get() with the timeval that goes into the
sprintf() you mention?
-- Steve
On Wed, 5 Jun 2019, Mark Webb-Johnson wrote:
> The CRTD timestamps should be unix julian time (not uptime). Produced by this:
>
> sprintf(m_buf,"%ld.%06ld %sR%s %0*X",
> time->tv_sec, time->tv_usec,
> busnumber,
> (frame->FIR.B.FF == CAN_frame_std) ? "11":"29",
> (frame->FIR.B.FF == CAN_frame_std) ? 3 : 8,
> frame->MsgID);
>
> Once module gets time from the vehicle (or gps), it should show the correct timestamps.
>
> Regards, Mark.
More information about the OvmsDev
mailing list