Skip to content

Refactoring - #1

Merged
xarleyn merged 29 commits into
mainfrom
refactoring
Aug 22, 2026
Merged

Refactoring#1
xarleyn merged 29 commits into
mainfrom
refactoring

Conversation

@xarleyn

@xarleyn xarleyn commented Aug 20, 2026

Copy link
Copy Markdown
Owner

No description provided.

xarleyn and others added 29 commits August 20, 2026 21:35
- Updated the analytics and map screens to use RadioGroup for radius selection, enhancing the UI consistency.
- Replaced print statements with debugPrint for better logging practices across various services, including location, upload, and debug log services.
When the companion radio drops unexpectedly (USB unplugged or BLE link
lost), LoRaCompanionService now remembers the device and reconnects
automatically with exponential backoff (3 s doubling up to 60 s). BLE
reconnects by remote id; USB re-scans the bus and matches on stable
attributes because Android reassigns deviceId on replug.

A disconnect made by the user is never followed by a reconnect:
disconnectDevice marks the session as user-requested, cancels any
pending loop, and an in-flight attempt that completes afterwards tears
the connection back down. A manual connect supersedes the loop.

LocationService suspends auto-ping on the loss and resumes it only when
the automatic reconnection restores the link. The map screen shows
snackbars when reconnection starts and succeeds and refreshes
connection badges via the new reconnectStateStream.
Auto-ping was only resumed when the automatic reconnection loop restored
the link (restored event). A device reconnected manually from the picker
never emitted that event, so pings stayed suspended until the wardrive
session was restarted - the reported regression.

- Broadcast a connection-established event for every successful connect
  (initial, manual, or automatic) once the handshake is done, and use it
  in LocationService to resume auto-ping regardless of who restored the
  link.
- Serialize explicit connects behind an in-flight background attempt so
  a manual connect waits instead of failing while that attempt runs, and
  short-circuit connects made while a link already exists to prevent
  duplicate stream subscriptions.
- Pause Carpeater mode deterministically on an unexpected link loss and
  restart it automatically once the link is back; clear both resume
  intents when the tracking session ends or Carpeater is switched off.
Play a distinctive double-beep tone with a matching double vibration whenever the LoRa companion radio drops the link unexpectedly (USB or Bluetooth). A disconnect made explicitly by the user stays silent.

The alert can be turned off in Settings -> Feedback (Link Loss Alert, enabled by default), takes effect immediately via the map settings runtime, and is included in settings export/import.
Automatic pings now pause when the configured number of consecutive
position fixes is rejected by the location quality filters (default: 5),
so a broken GPS signal can no longer ping a stale position. The pause
engages from both the time-based and distance-based ping paths, clears on
the next valid fix, and announces transitions with a snackbar.

Settings live in Location Quality Filters under a new Auto-Ping Pause
section: an enable toggle (on by default) plus the consecutive bad-fix
threshold (1-100). Both persist through the settings backup and are
applied at startup via the map settings controller.

A new BadFixMonitor tracks the rejection streak; LocationService records
rejected/accepted fixes and gates pings based on its state.
The in-app update check and the Settings > About 'View on GitHub' entry
now use the fork repository (xarleyn/Meshcore-Wardrive-Android-Source).
The check queries the releases list endpoint so a prerelease-only
repository is detected, and release tags are parsed for their dotted
version regardless of prefix.
Unlock a hidden "Быть легендой mesh сетей Смоленска" badge while the
connected companion radio reports a node name starting with "Ya_",
"Yakut", or "Якут" (case-insensitive). The device advert name is now
parsed from the SELF_INFO handshake response, exposed as
LoRaCompanionService.nodeAdvertName, and tracked in settings while the
companion is connected; it is cleared on every disconnect path.

Hidden achievements stay invisible on the Achievements screen (and out
of its progress counters) until unlocked. Adds en/ru strings, protocol
and achievement unit tests, and a changelog entry.
Co-authored-by: Cursor <cursoragent@cursor.com>
@xarleyn
xarleyn marked this pull request as ready for review August 22, 2026 09:30
@xarleyn
xarleyn merged commit 6769157 into main Aug 22, 2026
1 check passed
@xarleyn
xarleyn deleted the refactoring branch August 22, 2026 18:43
xarleyn added a commit that referenced this pull request Sep 1, 2026
The strict Signer #1 line match returned an empty digest on the CI
runner even though the APK verified fine. Match any certificate
SHA-256 digest line regardless of signer numbering, capture apksigner
failures without aborting, and print the raw print-certs output when
the check fails so format or keystore problems are visible in the log.
xarleyn added a commit that referenced this pull request Sep 1, 2026
Modern AGP signs release APKs with the v2 scheme only, and recent
build-tools print those signers with a V2 Signer label instead of
Signer #1, which the parser required. Match any certificate digest
line regardless of the signer label, keep the print-certs capture
non-fatal so the mismatch message is always reported, and leave the
failure output at the single mismatch message without extra debug
printing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant