#include "callbacks.h"
#include "appdata.h"
+#include "util.h"
// this is just here for debugging and tracing purposes
static void print_location(LocationGPSDevice* device) {
device->fix->speed);
}
-void location_changed(LocationGPSDevice* device, gpointer userdata) {
+void location_changed(LocationGPSDevice* device, gpointer data) {
+ print_location(device);
+ AppData* appdata = (AppData*) data;
+
+ if(device->fix && LOCATION_GPS_DEVICE_SPEED_SET) {
+ g_print("Speed is %f km/h", device->fix->speed);
+ interpret_speed_from_gps(appdata, device->fix->speed);
+ }
}
gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, HildonWindow* window) {