Add 'Find it' hot/cold RSSI finder + 'Make it ring' (GATT)
- FinderScreen: live smoothed RSSI as a growing, colour-shifting proximity meter (works on silent/modified tags that refuse to ring). Fed by ScanService.finderRssi (every advert, ahead of the DB throttle). - TrackerRinger: user-initiated GATT play-sound — VIGIL's one active operation (detection stays passive). DULT cross-vendor path (Google FMDN + DULT partners) implemented; Apple/others report gracefully pending per-ecosystem UUIDs (GATT protocol research in progress). UUIDs/opcode pending on-device verification. - Detail sheet: 'Find it' + 'Ring it' buttons; TrackerEntity.lastMac added (needed to GATT-connect); DB version 3. - BLUETOOTH_CONNECT was already declared for this. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187UiEtasyowhEBYs6s9iF5
This commit is contained in:
@@ -122,7 +122,8 @@ class TrackerRepository(private val db: VigilDatabase) {
|
||||
lastRssi = obs.rssi,
|
||||
peakRssi = maxOf(existing?.peakRssi ?: -127, obs.rssi),
|
||||
distinctPlaces = assessment.distinctPlaces,
|
||||
effectiveSightings = assessment.sightings
|
||||
effectiveSightings = assessment.sightings,
|
||||
lastMac = obs.mac
|
||||
)
|
||||
db.trackerDao().upsert(updated)
|
||||
RecordResult(updated, newlyAlerting)
|
||||
|
||||
@@ -37,7 +37,9 @@ data class TrackerEntity(
|
||||
val lastRssi: Int = 0,
|
||||
val peakRssi: Int = -127,
|
||||
val distinctPlaces: Int = 0,
|
||||
val effectiveSightings: Int = 0
|
||||
val effectiveSightings: Int = 0,
|
||||
// last-seen BLE MAC — needed to GATT-connect for "make it ring"
|
||||
val lastMac: String = ""
|
||||
)
|
||||
|
||||
/** One sighting of a tracker at one instant, geotagged when a fix is available. */
|
||||
@@ -114,7 +116,7 @@ interface PlaceDao {
|
||||
|
||||
@Database(
|
||||
entities = [TrackerEntity::class, SightingEntity::class, PlaceEntity::class],
|
||||
version = 2,
|
||||
version = 3,
|
||||
exportSchema = false
|
||||
)
|
||||
abstract class VigilDatabase : RoomDatabase() {
|
||||
|
||||
Reference in New Issue
Block a user