static struct blob_buf b;
static char *ubus_socket;
struct timespec stamp = { 0 };
+unsigned int adjust_clock = 0;
void
gps_timestamp(void)
blobmsg_add_u32(&b, "age", now.tv_sec - stamp.tv_sec);
blobmsg_add_string(&b, "latitude", latitude);
blobmsg_add_string(&b, "longitude", longitude);
- blobmsg_add_string(&b, "elivation", elivation);
+ blobmsg_add_string(&b, "elevation", elevation);
blobmsg_add_string(&b, "course", course);
blobmsg_add_string(&b, "speed", speed);
}
{
fprintf(stderr, "Usage: %s [options] <device>\n"
"Options:\n"
+ " -a Adjust system clock from gps\n"
" -s <path> Path to ubus socket\n"
" -d <level> Enable debug messages\n"
" -S Print messages to stdout\n"
unsetenv("DBGLVL");
}
- while ((ch = getopt(argc, argv, "d:D:s:S")) != -1) {
+ while ((ch = getopt(argc, argv, "ad:s:S")) != -1) {
switch (ch) {
+ case 'a':
+ adjust_clock = -1;
+ break;
case 's':
ubus_socket = optarg;
break;