Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gps.h and use distro's version #662

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions host_applications/linux/apps/raspicam/RaspiGPS.c
Expand Up @@ -73,7 +73,7 @@ static void *gps_reader_process(void *gps_reader_data_ptr)
(ret = read_gps_data_once(&gps_reader_data.gpsd)) < 0 )
break;

if (ret > 0 && gps_reader_data.gpsd.gpsdata.online)
if (ret > 0 && TS_NZ(gps_reader_data.gpsd.gpsdata.online))
{
if (gps_reader_data.gpsd.gpsdata.fix.mode >= MODE_2D)
{
Expand Down Expand Up @@ -201,12 +201,12 @@ char *raspi_gps_location_string()
{
time_t rawtime;
struct tm *timeinfo;
rawtime = gpsdata->fix.time;
rawtime = gpsdata->fix.time.tv_sec;
timeinfo = localtime(&rawtime);
strftime(datetime, sizeof(datetime), "%Y:%m:%d %H:%M:%S", timeinfo);
}

if (gpsdata->online && gpsdata->fix.mode >= MODE_2D)
if (TS_NZ(gpsdata->online) && gpsdata->fix.mode >= MODE_2D)
{
if (gpsdata->set & LATLON_SET)
{
Expand Down
4 changes: 2 additions & 2 deletions host_applications/linux/apps/raspicam/RaspiStill.c
Expand Up @@ -1257,13 +1257,13 @@ static void add_exif_tags(RASPISTILL_STATE *state, struct gps_data_t *gpsdata)
add_exif_tag(state, "GPS.GPSTrack=");
add_exif_tag(state, "GPS.GPSTrackRef=");

if (gpsdata->online)
if (TS_NZ(gpsdata->online))
{
if (state->common_settings.verbose)
fprintf(stderr, "Adding GPS EXIF\n");
if (gpsdata->set & TIME_SET)
{
rawtime = gpsdata->fix.time;
rawtime = gpsdata->fix.time.tv_sec;
timeinfo = localtime(&rawtime);
strftime(time_buf, sizeof(time_buf), "%Y:%m:%d", timeinfo);
snprintf(exif_buf, sizeof(exif_buf), "GPS.GPSDateStamp=%s", time_buf);
Expand Down