Commit 6090b086 authored by Javier Baliosian's avatar Javier Baliosian
Browse files

no guarda cada cambio del sensor de orientación.

parent 047a36e5
......@@ -423,8 +423,10 @@ public class TrackerService extends Service {
String updateMsg = "num scan results=" + (wifiScanResults == null ? "0" : wifiScanResults.size());
mTrackerData.writeEntry(WIFI_PROVIDER_TAG, updateMsg);
for(int i = 0; i < wifiScanResults.size(); i++){
mTrackerData.writeEntry(wifiScanResults.get(i).BSSID, wifiScanResults.get(i).level,lastLocation,lastDistance,lastSensorEvent);
if (lastLocation != null) {
for (int i = 0; i < wifiScanResults.size(); i++) {
mTrackerData.writeEntry(wifiScanResults.get(i).BSSID, wifiScanResults.get(i).level, lastLocation, lastDistance, lastSensorEvent);
}
}
} else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
......@@ -463,8 +465,8 @@ public class TrackerService extends Service {
private class SensorReceiver implements SensorEventListener {
public void onSensorChanged(SensorEvent event) {
if (lastLocation != null)
mTrackerData.writeEntry(lastLocation, lastDistance, event);
// if (lastLocation != null)
// mTrackerData.writeEntry(lastLocation, lastDistance, event);
lastSensorEvent = event;
}
......
......@@ -50,10 +50,10 @@ class CSVFormatter implements IFormatter {
rowOutput.append(entry.getType());
rowOutput.append(DELIMITER);
if (entry.getType() == EntryType.LOCATION_TYPE) {
rowOutput.append(DELIMITER);
rowOutput.append(entry.getValueBSSID());
rowOutput.append(DELIMITER);
rowOutput.append(entry.getValueRSSI());
rowOutput.append(DELIMITER);
if (entry.getLocation().hasAccuracy()) {
rowOutput.append(entry.getLocation().getAccuracy());
}
......
......@@ -85,21 +85,6 @@ class TrackerEntry {
private float valuePitch = 0;
private float valueRoll = 0;
public float getValueRSSI() {
return valueRSSI;
}
public String getValueBSSID() {
return valueBSSID == null ? "" : valueBSSID;
}
public void setValueBSSID(String valueBSSID) {
this.valueBSSID = valueBSSID;
}
public void setValueRSSI(float valueRSSI) {
this.valueRSSI = valueRSSI;
}
//WIFI information
private float valueRSSI = 0;
......@@ -136,6 +121,7 @@ class TrackerEntry {
valueAzimuth = event.values[0];
valuePitch = event.values[1];
valueRoll = event.values[2];
valueBSSID = BSSID;
valueRSSI = RSSI;
}
......@@ -246,6 +232,22 @@ class TrackerEntry {
return entry;
}
public float getValueRSSI() {
return valueRSSI;
}
public String getValueBSSID() {
return valueBSSID == null ? "" : valueBSSID;
}
public void setValueBSSID(String valueBSSID) {
this.valueBSSID = valueBSSID;
}
public void setValueRSSI(float valueRSSI) {
this.valueRSSI = valueRSSI;
}
public float getValueAzimuth() {
return valueAzimuth;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment