Fixed Wifi RTT errors
This commit is contained in:
@@ -254,12 +254,12 @@ public class MainActivity extends Activity {
|
||||
|
||||
|
||||
// update UI for WIFI/BEACON/GPS
|
||||
if (id == SensorType.WIFI || id == SensorType.IBEACON || id == SensorType.GPS) {
|
||||
if (id == SensorType.WIFIRTT || id == SensorType.IBEACON || id == SensorType.GPS) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (id == SensorType.WIFI) {
|
||||
if (id == SensorType.WIFIRTT) {
|
||||
final TextView txt = (TextView) findViewById(R.id.txtWifi);
|
||||
txt.setText(((++loadCounterWifi % 2) == 0) ? "wi" : "WI");
|
||||
} else if (id == SensorType.IBEACON) {
|
||||
@@ -465,7 +465,7 @@ public class MainActivity extends Activity {
|
||||
sensors.add(wifirtt);
|
||||
wifirtt.setListener(new mySensor.SensorListener() {
|
||||
@Override public void onData(final long timestamp, final String csv) { add(SensorType.WIFIRTT, csv, timestamp); }
|
||||
@Override public void onData(final SensorType id, final long timestamp, final String csv) {return; }
|
||||
@Override public void onData(final SensorType id, final long timestamp, final String csv) { add(SensorType.WIFIRTT, csv, timestamp); }
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public class WiFiRTT extends mySensor {
|
||||
|
||||
if (res.getStatus() == RangingResult.STATUS_SUCCESS) {
|
||||
success = 1;
|
||||
timeStampInNS = res.getRangingTimestampMillis() * 1000;
|
||||
timeStampInNS = res.getRangingTimestampMillis() * 1000000;
|
||||
dist = res.getDistanceMm();
|
||||
stdDevDist = res.getDistanceStdDevMm();
|
||||
rssi = res.getRssi();
|
||||
|
||||
Reference in New Issue
Block a user