mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 11:52:07 +10:00
expose mode 3 in UI
This commit is contained in:
@@ -2588,7 +2588,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
|
||||
Future<void> setPathHashMode(int mode) async {
|
||||
if (!isConnected) return;
|
||||
final clampedMode = mode.clamp(0, 2).toInt();
|
||||
final clampedMode = mode.clamp(0, 3).toInt();
|
||||
await sendFrame(buildSetPathHashModeFrame(clampedMode));
|
||||
final nextWidth = clampedMode + 1;
|
||||
if (_pathHashByteWidth != nextWidth) {
|
||||
|
||||
@@ -566,9 +566,9 @@ Uint8List buildGetStatsFrame(int statsType) {
|
||||
return Uint8List.fromList([cmdGetStats, statsType & 0xFF]);
|
||||
}
|
||||
|
||||
/// Path hash width on air: [61][0][mode], mode 0..2 → (mode+1) bytes per hop hash.
|
||||
/// Path hash width on air: [61][0][mode], mode 0..3 → (mode+1) bytes per hop hash.
|
||||
Uint8List buildSetPathHashModeFrame(int mode) {
|
||||
final m = mode.clamp(0, 2);
|
||||
final m = mode.clamp(0, 3).toInt();
|
||||
return Uint8List.fromList([cmdSetPathHashMode, 0, m]);
|
||||
}
|
||||
|
||||
|
||||
@@ -262,6 +262,10 @@
|
||||
"appSettings_languageBg": "Български",
|
||||
"appSettings_languageRu": "Русский",
|
||||
"appSettings_languageUk": "Українська",
|
||||
"repeater_pathHashModeOption0": "0 - 1 byte",
|
||||
"repeater_pathHashModeOption1": "1 - 2 bytes",
|
||||
"repeater_pathHashModeOption2": "2 - 3 bytes",
|
||||
"repeater_pathHashModeOption3": "3 - 4 bytes",
|
||||
"appSettings_enableMessageTracing": "Enable Message Tracing",
|
||||
"appSettings_enableMessageTracingSubtitle": "Show detailed routing and timing metadata for messages",
|
||||
"appSettings_notifications": "Notifications",
|
||||
|
||||
@@ -1324,6 +1324,30 @@ abstract class AppLocalizations {
|
||||
/// **'Українська'**
|
||||
String get appSettings_languageUk;
|
||||
|
||||
/// No description provided for @repeater_pathHashModeOption0.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'0 - 1 byte'**
|
||||
String get repeater_pathHashModeOption0;
|
||||
|
||||
/// No description provided for @repeater_pathHashModeOption1.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'1 - 2 bytes'**
|
||||
String get repeater_pathHashModeOption1;
|
||||
|
||||
/// No description provided for @repeater_pathHashModeOption2.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'2 - 3 bytes'**
|
||||
String get repeater_pathHashModeOption2;
|
||||
|
||||
/// No description provided for @repeater_pathHashModeOption3.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'3 - 4 bytes'**
|
||||
String get repeater_pathHashModeOption3;
|
||||
|
||||
/// No description provided for @appSettings_enableMessageTracing.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -666,6 +666,18 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Украински';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Разрешаване на проследяване на съобщения';
|
||||
|
||||
@@ -661,6 +661,18 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ukrainisch';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Nachrichtenverfolgung aktivieren';
|
||||
|
||||
@@ -651,6 +651,18 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Українська';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'Enable Message Tracing';
|
||||
|
||||
|
||||
@@ -662,6 +662,18 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ucraniano';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Habilitar seguimiento de mensajes';
|
||||
|
||||
@@ -666,6 +666,18 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ukrainien';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Activer le traçage des messages';
|
||||
|
||||
@@ -666,6 +666,18 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Украинский';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Engedje meg a üzenetek nyomon követését';
|
||||
|
||||
@@ -664,6 +664,18 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ucraino';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Abilita tracciamento messaggi';
|
||||
|
||||
@@ -637,6 +637,18 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'ウクライナ語';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'メッセージ追跡機能を有効にする';
|
||||
|
||||
|
||||
@@ -637,6 +637,18 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => '우크라이나';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => '메시지 추적 기능 활성화';
|
||||
|
||||
|
||||
@@ -658,6 +658,18 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Oekraïens';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'Berichttracking inschakelen';
|
||||
|
||||
|
||||
@@ -667,6 +667,18 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ukraińska';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'Włącz śledzenie wiadomości';
|
||||
|
||||
|
||||
@@ -664,6 +664,18 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ucraniano';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Ativar rastreamento de mensagens';
|
||||
|
||||
@@ -664,6 +664,18 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Українська';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Включить трассировку сообщений';
|
||||
|
||||
@@ -658,6 +658,18 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ukrajinská';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'Povoliť sledovanie správ';
|
||||
|
||||
|
||||
@@ -655,6 +655,18 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ukrajinsko';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'Omogoči sledenje sporočilom';
|
||||
|
||||
|
||||
@@ -653,6 +653,18 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Ukrainska';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => 'Aktivera meddelandespårning';
|
||||
|
||||
|
||||
@@ -661,6 +661,18 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => 'Українська';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing =>
|
||||
'Увімкнути відстеження повідомлень';
|
||||
|
||||
@@ -628,6 +628,18 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_languageUk => '乌克兰语';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption0 => '0 - 1 byte';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption1 => '1 - 2 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption2 => '2 - 3 bytes';
|
||||
|
||||
@override
|
||||
String get repeater_pathHashModeOption3 => '3 - 4 bytes';
|
||||
|
||||
@override
|
||||
String get appSettings_enableMessageTracing => '启用消息追踪';
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
|
||||
void _editPathHashMode(BuildContext context, MeshCoreConnector connector) {
|
||||
final l10n = context.l10n;
|
||||
var selectedMode = (connector.pathHashByteWidth - 1).clamp(0, 2).toInt();
|
||||
var selectedMode = (connector.pathHashByteWidth - 1).clamp(0, 3).toInt();
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -584,6 +584,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
DropdownMenuItem(value: 0, child: Text('0 - 1 byte')),
|
||||
DropdownMenuItem(value: 1, child: Text('1 - 2 bytes')),
|
||||
DropdownMenuItem(value: 2, child: Text('2 - 3 bytes')),
|
||||
DropdownMenuItem(value: 3, child: Text('3 - 4 bytes')),
|
||||
],
|
||||
onChanged: (value) {
|
||||
if (value == null) return;
|
||||
|
||||
Reference in New Issue
Block a user