try fix error with setting save_track_interval and live_monitoring_interval

This commit is contained in:
sonora 2012-09-05 13:12:25 +02:00
parent e7153f1a41
commit fa46800c2c
2 changed files with 6 additions and 2 deletions

View file

@ -39,7 +39,9 @@ public class LiveMonitoringHelper {
}
public void insertData(double lat, double lon, double alt, double speed, double hdop, long time, OsmandSettings settings){
if (time - lastTimeUpdated > settings.LIVE_MONITORING_INTERVAL.get() * 1000) {
//* 1000 in next line seems to be wrong with new IntervalChooseDialog
//if (time - lastTimeUpdated > settings.LIVE_MONITORING_INTERVAL.get() * 1000) {
if (time - lastTimeUpdated > settings.LIVE_MONITORING_INTERVAL.get()) {
LiveMonitoringData data = new LiveMonitoringData((float)lat, (float)lon,(float) alt,(float) speed,(float) hdop, time );
new LiveSender().execute(data);
lastTimeUpdated = time;

View file

@ -268,7 +268,9 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
}
public void insertData(double lat, double lon, double alt, double speed, double hdop, long time, OsmandSettings settings){
if ((time - lastTimeUpdated > settings.SAVE_TRACK_INTERVAL.get() * 1000)) {
//* 1000 in next line seems to be wrong with new IntervalChooseDialog
//if (time - lastTimeUpdated > settings.SAVE_TRACK_INTERVAL.get() * 1000) {
if (time - lastTimeUpdated > settings.SAVE_TRACK_INTERVAL.get()) {
execWithClose(updateScript, new Object[] { lat, lon, alt, speed, hdop, time });
boolean newSegment = false;
if (lastPoint == null || (time - lastTimeUpdated) > 180 * 1000) {