paparazzi / pprzlink

Message and communication library for the Paparazzi UAV system
Other
24 stars 55 forks source link

Pprzlog maximum time overflow #163

Closed fvantienen closed 9 months ago

fvantienen commented 1 year ago

We take the time in usec like this: extern void pprzlog_transport_init(struct pprzlog_transport *t, uint32_t (*get_time_usec_t)(void)); But here it gets divided by 100: https://github.com/paparazzi/pprzlink/blob/master/lib/v2.0/C/pprzlog_transport.c#L92

This means that the maximum time in usec is 2^32/1e6 = 4294 seconds / 60 = 71,58 minutes. While theoretically we could fit 2^32/1e4 = 429496 seconds / 60 = 7158 minutes = 119 hours.

We should change the get_time_usec_t to get_time_10msec_t or to 64bits.

dewagter commented 9 months ago

Solved in https://github.com/paparazzi/paparazzi/pull/3056