Refactor LoRa airtime tests and add new functionality

- Updated LoRa airtime calculations in `lora_airtime_test.dart` to reflect new reference values.
- Introduced new tests for LDRO behavior and preamble symbol calculations.
- Added `contact_path_width_test.dart` to validate path hash width handling in contacts.
- Enhanced `model_changes_test.dart` to ensure legacy data migration works correctly.
- Created `remote_node_stats_test.dart` to decode and validate remote node statistics.
- Implemented `map_marker_parse_test.dart` for parsing marker text with coordinate validation.
- Developed `map_tile_cache_key_test.dart` to ensure API keys are excluded from cache keys.
- Added `message_retry_failure_test.dart` to test message retry service behavior on failures.
- Extended `path_history_service_test.dart` to preserve learned state across path attempts.
- Enhanced `received_image_store_test.dart` to handle concurrent writes and review fixes.
- Implemented `repeater_command_service_test.dart` to validate command response handling.
- Created `store_tolerant_parsing_test.dart` to ensure stores skip malformed records gracefully.
- Cleared untranslated JSON file for localization updates.
This commit is contained in:
Zach committed 2026-09-25 10:01:18 -07:00
1 parent d5f54dfa11
commit d74587c167
105 files changed
+6419 -2072

No files matched your search

+6 -1
View File
@@ -40,6 +40,7 @@ class _TelemetryScreenState extends State<TelemetryScreen> {
static const int _autoRefreshMaxQuantity = 10;
int _tagData = 0;
bool _awaitingSent = false;
bool _isLoading = false;
bool _isLoaded = false;
@@ -101,7 +102,8 @@ class _TelemetryScreenState extends State<TelemetryScreen> {
final reader = BufferReader(frame);
try {
final cmd = reader.readByte();
if (cmd == respCodeSent) {
if (cmd == respCodeSent && _awaitingSent) {
_awaitingSent = false;
reader.skipBytes(1); // Skip the reserved byte
_tagData = reader.readUInt32LE();
_tripTime = reader.readUInt32LE();
@@ -183,6 +185,7 @@ class _TelemetryScreenState extends State<TelemetryScreen> {
);
}
_statusTimeout?.cancel();
_recordTelemetryResult(true);
if (!mounted) return;
setState(() {
_isLoading = false;
@@ -217,8 +220,10 @@ class _TelemetryScreenState extends State<TelemetryScreen> {
} else {
frame = buildSendTelemetryReq(widget.contact.publicKey);
}
_awaitingSent = true;
await connector.sendFrame(frame);
} catch (e) {
_awaitingSent = false;
if (mounted) {
setState(() {
_isLoading = false;