Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/driver_playback.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int parse_and_run_imu(const char *line, SurvivePlaybackData *driver, bool
return 0;

char dev[10];
int timecode = 0;
survive_timecode timecode = 0;
FLT accelgyro[9] = { 0 };
int mask;
int id;
Expand All @@ -231,7 +231,7 @@ static int parse_and_run_imu(const char *line, SurvivePlaybackData *driver, bool
char i_char = 0;

int rr = sscanf(line,
"%s %c %d %d " FLT_sformat " " FLT_sformat " " FLT_sformat " " FLT_sformat " " FLT_sformat
"%s %c %d %u " FLT_sformat " " FLT_sformat " " FLT_sformat " " FLT_sformat " " FLT_sformat
" " FLT_sformat " " FLT_sformat " " FLT_sformat " " FLT_sformat "%d",
dev, &i_char, &mask, &timecode, &accelgyro[0], &accelgyro[1], &accelgyro[2], &accelgyro[3],
&accelgyro[4], &accelgyro[5], &accelgyro[6], &accelgyro[7], &accelgyro[8], &id);
Expand Down
9 changes: 8 additions & 1 deletion src/driver_usbmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,14 @@ static int gzip_cookie_close(void *cookie) { return gzclose((gzFile)cookie); }

static ssize_t gzip_cookie_read(void *cookie, char *buf, size_t nbytes) { return gzread((gzFile)cookie, buf, nbytes); }

int gzip_cookie_seek(void *cookie, z_off_t *pos, int __w) { return gzseek((gzFile)cookie, *pos, __w); }
static int gzip_cookie_seek(void *cookie, off64_t *pos, int whence) {
z_off64_t r = gzseek64((gzFile)cookie, (z_off64_t)*pos, whence);
Comment thread
bl4ckb0ne marked this conversation as resolved.
if (r < 0)
return -1;

*pos = (off64_t)r;
return 0;
}

cookie_io_functions_t gzip_cookie = {
.close = gzip_cookie_close, .write = gzip_cookie_write, .read = gzip_cookie_read, .seek = gzip_cookie_seek};
Expand Down
2 changes: 1 addition & 1 deletion src/survive_sensor_activations.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ SURVIVE_EXPORT survive_long_timecode SurviveSensorActivations_long_timecode_ligh
use that as a basis. It's worth noting that I've never seen a system develop this while running; it would
likely cause some chaos if it did since it'd kick the kalman out of sorts.
***/
if (self->last_imu != 0 && labs(time_sync_error) > 48000000) {
if (self->last_imu != 0 && llabs(time_sync_error) > 48000000) {
int64_t offset = 0x10000000;
int scale = DIV_ROUND_CLOSEST(time_sync_error, offset);
initial_time -= offset * scale;
Expand Down