Added a circular buffer to store 4 hours worth of watch signal strength for a graph

This commit is contained in:
Graham Jones
2024-04-13 21:09:50 +01:00
parent 568c932101
commit 163dd0f4d9
2 changed files with 2 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ public class SdData implements Parcelable {
public CircBuf watchBattBuff = new CircBuf(24*3600/5, -1); // 24 hour buffer
public CircBuf phoneBattBuff = new CircBuf(24*3600/5, -1); // 24 hour buffer
public CircBuf watchSignalStrengthBuff = new CircBuf(4*3600/5, -1); // 4 hour buffer
/* Heart Rate Alarm Settings */
public boolean mHRAlarmActive = false;

View File

@@ -497,7 +497,7 @@ public class SdDataSourceBLE2 extends SdDataSource {
public void onReadRemoteRssi(@NotNull BluetoothPeripheral peripheral, int rssi, @NotNull GattStatus status) {
Log.d(TAG, String.format("Rssi = %d", rssi));
mSdData.watchSignalStrength = rssi;
mSdData.watchSignalStrengthBuff.add(rssi);
}
};