mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Tweak AVIF tuning and preferences
This commit is contained in:
@@ -205,7 +205,34 @@ Status line below thumbnail:
|
||||
- Receiver (pending): `🖼️ Tap to load · {w}×{h}`
|
||||
- Loading: `📥 Loading… {received}/{total}`
|
||||
|
||||
## 9. Persistence
|
||||
## 9. Transmit Time Estimate (UI)
|
||||
|
||||
Image bubbles and Message Technical Details show an **estimated transmit time** (`~... tx`).
|
||||
|
||||
The estimate is airtime-based (LoRa packet model), not just compressed image size:
|
||||
|
||||
- Source inputs:
|
||||
- `total` fragments and `bytes` from `IE1` envelope
|
||||
- `pathLen` from message metadata
|
||||
- current radio params from `deviceInfo`: `radioBw`, `radioSf`, `radioCr`
|
||||
- Per-fragment payload model:
|
||||
- `meshHeader(2)` + `pathLen` + `imageHeader(8)` + `fragmentBytes`
|
||||
- LoRa airtime:
|
||||
- standard symbol-time formula (preamble + payload symbols)
|
||||
- Mesh pacing/hops:
|
||||
- multiplied by `(1 + airtimeBudgetFactor)` where default factor is `1.0`
|
||||
- multiplied by hop count `(pathLen + 1)`
|
||||
- Total estimate:
|
||||
- sum over all fragments
|
||||
|
||||
BW handling:
|
||||
|
||||
- If `radioBw` is index `0..9`, app maps it to Hz (`7.8k` .. `500k`)
|
||||
- If `radioBw > 1000`, it is treated as Hz directly
|
||||
|
||||
Fallback defaults are used when radio params are unavailable: `SF10`, `BW250kHz`, `CR5`.
|
||||
|
||||
## 10. Persistence
|
||||
|
||||
`ImageProvider` stores sessions in `SharedPreferences` under key
|
||||
`stored_image_sessions_v1`:
|
||||
@@ -214,14 +241,14 @@ Status line below thumbnail:
|
||||
- Outgoing: fragment list + envelope text + `cachedAt` timestamp.
|
||||
- Expired outgoing sessions (> 15 min) are not restored on startup.
|
||||
|
||||
## 10. Operational Constraints
|
||||
## 11. Operational Constraints
|
||||
|
||||
- No firmware changes required (reuses `cmdSendRawData` / `pushRawData`).
|
||||
- On-demand fetch works only if sender app is online and has cached session.
|
||||
- Raw return path requires a valid direct route to requester.
|
||||
- Available on iOS and Android (`image_picker` + `flutter_avif`).
|
||||
|
||||
## 11. High-Level Sequence
|
||||
## 12. High-Level Sequence
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
|
||||
@@ -175,19 +175,47 @@ Parser validation enforces:
|
||||
|
||||
`VR1` handling verifies sender prefix matches `requesterKey6` to reduce spoofing risk.
|
||||
|
||||
## 10. Operational Constraints
|
||||
## 10. Transmit Time Estimate (UI)
|
||||
|
||||
Voice bubbles and Message Technical Details show an **estimated transmit time** (`~... tx`).
|
||||
|
||||
The estimate is airtime-based (LoRa packet model), not file-duration-only:
|
||||
|
||||
- Source inputs:
|
||||
- `packetCount` and `durationMs` from `VE1` envelope, or
|
||||
- actual received `VoicePacket.codec2Data.length` bytes when local session packets exist
|
||||
- `pathLen` from message metadata
|
||||
- current radio params from `deviceInfo`: `radioBw`, `radioSf`, `radioCr`
|
||||
- Per-packet payload model:
|
||||
- `meshHeader(2)` + `pathLen` + `voiceHeader(8)` + `codec2Bytes`
|
||||
- LoRa airtime:
|
||||
- standard symbol-time formula (preamble + payload symbols)
|
||||
- Mesh pacing/hops:
|
||||
- multiplied by `(1 + airtimeBudgetFactor)` where default factor is `1.0`
|
||||
- multiplied by hop count `(pathLen + 1)`
|
||||
- Total estimate:
|
||||
- sum over all packets
|
||||
|
||||
BW handling:
|
||||
|
||||
- If `radioBw` is index `0..9`, app maps it to Hz (`7.8k` .. `500k`)
|
||||
- If `radioBw > 1000`, it is treated as Hz directly
|
||||
|
||||
Fallback defaults are used when radio params are unavailable: `SF10`, `BW250kHz`, `CR5`.
|
||||
|
||||
## 11. Operational Constraints
|
||||
|
||||
- No firmware changes required.
|
||||
- On-demand fetch works only if sender app is online and has cached session.
|
||||
- Raw return path needs a currently valid direct route to requester.
|
||||
- Voice capture is available on iOS and Android (`Platform.isIOS || Platform.isAndroid`).
|
||||
|
||||
## 11. Backward Compatibility
|
||||
## 12. Backward Compatibility
|
||||
|
||||
- Legacy `V:` text packet parsing is still supported.
|
||||
- Message voice detection accepts both new `VE1` and legacy `V:` formats.
|
||||
|
||||
## 12. High-Level Sequence
|
||||
## 13. High-Level Sequence
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
|
||||
Reference in New Issue
Block a user