+ power on/off the gps and start/stop gpsd
+ set to keep the GPS on during suspend
+ use the gpsd protocol to know if there is a fix or not
+ + time from the GPS in main clock
- suspend/resume hooks to put the GPS into low power mode
+ - GPS FixNow mode for sleeping
- log
- timestamp, coordinates
- message (structured) (json?)
Section: unknown
Priority: extra
Maintainer: Enrico Zini <enrico@enricozini.org>
-Build-Depends: debhelper (>= 7), cmake (>= 2.6), valac, libglib2.0-dev, libdbus-glib-1-dev, libgtk2.0-dev, libwnck-dev, libomhacks-dev (>= 0.5), liblua5.1-dev
+Build-Depends: debhelper (>= 7), cmake (>= 2.6), valac, libglib2.0-dev, libdbus-glib-1-dev, libgtk2.0-dev, libwnck-dev, libomhacks-dev (>= 0.5), liblua5.1-dev, libgps-dev
Standards-Version: 3.8.4
Homepage: http://git.debian.org/?p=users/enrico/zavai.git
protected time_t last_gps_time;
protected time_t last_gps_time_system_time;
protected time_t last_system_time;
- protected dynamic DBus.Object gps_time;
protected uint system_time_timeout;
protected time_t last_minute;
protected time_t chosen_time;
last_system_time = time_t();
chosen_time = last_system_time;
- gps_time = zavai.registry.sbus.get_object(
- "org.freesmartphone.ogpsd",
- "/org/freedesktop/Gypsy",
- "org.freedesktop.Gypsy.Time");
-
// FSO alarm system
otimed_alarm = zavai.registry.sbus.get_object(
"org.freesmartphone.otimed",
schedule_changed(next_alarm());
}
- private void on_gps_time(dynamic DBus.Object pos, int t)
+ private void on_gps_time(uint t)
{
if (t == 0)
{
if (started) return;
system_time_timeout = Timeout.add(5000, on_system_time);
- gps_time.TimeChanged += on_gps_time;
+ zavai.gps.gps.time_changed += on_gps_time;
last_system_time = time_t();
update_time();
if (!started) return;
Source.remove(system_time_timeout);
- gps_time.TimeChanged -= on_gps_time;
+ zavai.gps.gps.time_changed -= on_gps_time;
base.stop();
}
protected uint gpsfd_watch = 0;
protected int old_fix_status = libgps.STATUS_NO_FIX;
+ protected uint old_time = 0;
public signal void fix_status_changed(int status);
+ public signal void time_changed(uint time);
public GPS()
{
}
public int fix_status() { return old_fix_status; }
+ public double time() { return old_time; }
protected bool on_input_data(IOChannel source, IOCondition condition)
{
fix_status_changed(data.status);
old_fix_status = data.status;
}
+
+ uint cur_time = (uint)data.fix.time;
+ if (data.status != libgps.STATUS_NO_FIX && old_time != cur_time)
+ {
+ time_changed(cur_time);
+ old_time = cur_time;
+ }
+
/*
stderr.printf("GPSMSG %d %d\n", (int)data.set, data.status);
stderr.printf("SATUSED %d\n", data.satellites_used);
fix_status_changed(old_fix_status);
}
+ if (old_time != 0)
+ {
+ old_time = 0;
+ time_changed(old_time);
+ }
+
base.stop();
}
}