Remove automatic telemetry querying, remove battery pane, add telemetry history pane

This commit is contained in:
Gnome Adrift
2026-04-01 11:54:39 -07:00
committed by Jack Kingsman
parent 87df4b4aa1
commit c808f0930b
19 changed files with 272 additions and 596 deletions
+2 -10
View File
@@ -3109,16 +3109,14 @@ async def _migrate_049_foreign_key_cascade(conn: aiosqlite.Connection) -> None:
async def _migrate_050_repeater_telemetry_history(conn: aiosqlite.Connection) -> None:
"""Create repeater_telemetry_history table and add tracking opt-in column to app_settings."""
"""Create repeater_telemetry_history table for JSON-blob telemetry snapshots."""
await conn.execute(
"""
CREATE TABLE IF NOT EXISTS repeater_telemetry_history (
id INTEGER PRIMARY KEY AUTOINCREMENT,
public_key TEXT NOT NULL,
timestamp INTEGER NOT NULL,
battery_volts REAL NOT NULL,
uptime_seconds INTEGER,
noise_floor_dbm INTEGER,
data TEXT NOT NULL,
FOREIGN KEY (public_key) REFERENCES contacts(public_key) ON DELETE CASCADE
)
"""
@@ -3129,10 +3127,4 @@ async def _migrate_050_repeater_telemetry_history(conn: aiosqlite.Connection) ->
ON repeater_telemetry_history (public_key, timestamp)
"""
)
try:
await conn.execute(
"ALTER TABLE app_settings ADD COLUMN telemetry_tracked_keys TEXT DEFAULT '[]'"
)
except Exception:
pass # Column may already exist
await conn.commit()