Added app version name to logged JSON data
This commit is contained in:
@@ -38,6 +38,7 @@ public class SdData implements Parcelable {
|
||||
private final static String TAG = "SdData";
|
||||
private final static int N_RAW_DATA = 500; // 5 seconds at 100 Hz.
|
||||
/* Analysis settings */
|
||||
public String phoneAppVersion = "";
|
||||
public boolean haveSettings = false; // flag to say if we have received settings or not.
|
||||
public boolean haveData = false; // flag to say we have received data.
|
||||
public short mDataUpdatePeriod;
|
||||
@@ -252,6 +253,8 @@ public class SdData implements Parcelable {
|
||||
jsonObj.put("o2SatAlarmStanding", mO2SatAlarmStanding);
|
||||
jsonObj.put("o2SatThreshMin", mO2SatThreshMin);
|
||||
jsonObj.put("dataSourceName", dataSourceName);
|
||||
Log.v(TAG,"phoneAppVersion="+phoneAppVersion);
|
||||
jsonObj.put("phoneAppVersion", phoneAppVersion);
|
||||
jsonObj.put("watchPartNo", watchPartNo);
|
||||
jsonObj.put("watchSdName", watchSdName);
|
||||
jsonObj.put("watchFwVersion", watchFwVersion);
|
||||
|
||||
@@ -227,8 +227,9 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
Log.v(TAG, "onStartCommand() - calling updatePrefs()");
|
||||
updatePrefs();
|
||||
|
||||
Log.v(TAG, "onStartCommand: Datasource =" + mSdDataSourceName);
|
||||
Log.v(TAG, "onStartCommand: Datasource =" + mSdDataSourceName + ", phoneAppVersion="+mUtil.getAppVersionName());
|
||||
mSdData.dataSourceName = mSdDataSourceName;
|
||||
mSdData.phoneAppVersion = mUtil.getAppVersionName();
|
||||
switch (mSdDataSourceName) {
|
||||
case "Pebble":
|
||||
Log.v(TAG, "Selecting Pebble DataSource");
|
||||
@@ -760,6 +761,9 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
stopFaultTimer();
|
||||
}
|
||||
mSdData = sdData;
|
||||
mSdData.dataSourceName = mSdDataSourceName;
|
||||
mSdData.phoneAppVersion = mUtil.getAppVersionName();
|
||||
|
||||
if (webServer != null) webServer.setSdData(mSdData);
|
||||
Log.v(TAG, "onSdDataReceived() - setting mSdData to " + mSdData.toString());
|
||||
|
||||
@@ -1332,7 +1336,6 @@ public class SdServer extends Service implements SdDataReceiver {
|
||||
/**
|
||||
* onSdLocationReceived - called with the best estimate location after mLocationReceiver times out.
|
||||
*
|
||||
* @param ll - location (may be null if no location found)
|
||||
*/
|
||||
private void sendSMS(String phoneNo, String msgStr) {
|
||||
Log.i(TAG, "sendSMS() - Sending to " + phoneNo);
|
||||
|
||||
Reference in New Issue
Block a user