Skip to content

Commit 3dd7e87

Browse files
committed
float type for minspeed
1 parent f80d9ca commit 3dd7e87

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gpstrack.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
#include "gpstrack.h"
3333

3434

35-
void publish_gps_data(struct pubnub_sync *s, struct pubnub *p, json_object *data, double minspeed) {
35+
void publish_gps_data(struct pubnub_sync *s, struct pubnub *p, json_object *data, float minspeed) {
3636

3737
struct json_object* tmpobj;
3838
float speed = 0.0;
3939

40-
/*extract speed key from json*/
40+
/*extract speed key from json data*/
4141
if (json_object_object_get_ex(json_object_array_get_idx(data,0), "speed", &tmpobj)) {
4242
speed = json_object_get_double(tmpobj);
4343
/*publish only if taget moving*/
@@ -120,4 +120,4 @@ int main(int argc, char **argv)
120120
pubnub_done(pubnb);
121121
fclose(fp);
122122
return 0;
123-
}
123+
}

gpstrack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
/* Knot to meter/s conversion*/
3535
#define KNT2MPS 0.51444444444
3636

37-
void publish_gps_data(struct pubnub_sync *s, struct pubnub *p, json_object *data, double minspeed);
37+
void publish_gps_data(struct pubnub_sync *s, struct pubnub *p, json_object *data, float minspeed);

0 commit comments

Comments
 (0)