feat: Enhance Device Configuration Screen with Device Info and Telemetry Modes

- Added a new section to display device information including Device Type, Max Contacts, Max Channels, Telemetry Modes, and Manual Add Contacts.
- Implemented helper methods to convert device types and telemetry modes to user-friendly strings.
- Removed Message History Screen and its references from the Home Screen.
- Simplified message sending logic in Messages Tab to always send to the public channel.
- Introduced a new channel selection feature in the SAR Update Sheet for sending messages.
- Updated MeshCore BLE service to handle send confirmation responses and improved message sending protocols.
This commit is contained in:
Janez T
2025-10-14 20:43:58 +02:00
parent 5ff4138de0
commit 219eeecacd
8 changed files with 1121 additions and 1026 deletions

View File

@@ -34,10 +34,19 @@ class DeviceInfo {
final int? radioCr;
final String? selfName;
// Additional device capabilities (from RESP_CODE_DEVICE_INFO)
final int? maxContacts; // Max contacts device supports
final int? maxChannels; // Max channels device supports
final int? telemetryModes; // Telemetry permission modes (bits 0-1: Base, bits 2-3: Location)
final int? blePin; // BLE PIN code
final int? multiAcks; // Extra ACK mode (0=no, 1=yes)
final int? advertLocPolicy; // Location sharing policy (0=don't share, 1=share)
// Firmware info
final int? firmwareVersion;
final String? firmwareBuildDate;
final String? manufacturerModel;
final String? semanticVersion;
DeviceInfo({
this.deviceId,
@@ -60,9 +69,16 @@ class DeviceInfo {
this.radioSf,
this.radioCr,
this.selfName,
this.maxContacts,
this.maxChannels,
this.telemetryModes,
this.blePin,
this.multiAcks,
this.advertLocPolicy,
this.firmwareVersion,
this.firmwareBuildDate,
this.manufacturerModel,
this.semanticVersion,
});
/// Check if device is connected
@@ -144,9 +160,16 @@ class DeviceInfo {
int? radioSf,
int? radioCr,
String? selfName,
int? maxContacts,
int? maxChannels,
int? telemetryModes,
int? blePin,
int? multiAcks,
int? advertLocPolicy,
int? firmwareVersion,
String? firmwareBuildDate,
String? manufacturerModel,
String? semanticVersion,
}) {
return DeviceInfo(
deviceId: deviceId ?? this.deviceId,
@@ -169,9 +192,16 @@ class DeviceInfo {
radioSf: radioSf ?? this.radioSf,
radioCr: radioCr ?? this.radioCr,
selfName: selfName ?? this.selfName,
maxContacts: maxContacts ?? this.maxContacts,
maxChannels: maxChannels ?? this.maxChannels,
telemetryModes: telemetryModes ?? this.telemetryModes,
blePin: blePin ?? this.blePin,
multiAcks: multiAcks ?? this.multiAcks,
advertLocPolicy: advertLocPolicy ?? this.advertLocPolicy,
firmwareVersion: firmwareVersion ?? this.firmwareVersion,
firmwareBuildDate: firmwareBuildDate ?? this.firmwareBuildDate,
manufacturerModel: manufacturerModel ?? this.manufacturerModel,
semanticVersion: semanticVersion ?? this.semanticVersion,
);
}