Merge pull request #424 from zjs81/chan-util

basic repeater chan util
This commit is contained in:
zjs81
2026-05-08 13:40:28 -07:00
committed by GitHub
24 changed files with 111 additions and 17 deletions
+1
View File
@@ -1156,6 +1156,7 @@
"repeater_noiseFloor": "Noise Floor",
"repeater_txAirtime": "TX Airtime",
"repeater_rxAirtime": "RX Airtime",
"repeater_chanUtil": "Channel Utilization",
"repeater_packetStatistics": "Packet Statistics",
"repeater_sent": "Sent",
"repeater_received": "Received",
+6
View File
@@ -3891,6 +3891,12 @@ abstract class AppLocalizations {
/// **'RX Airtime'**
String get repeater_rxAirtime;
/// No description provided for @repeater_chanUtil.
///
/// In en, this message translates to:
/// **'Channel Utilization'**
String get repeater_chanUtil;
/// No description provided for @repeater_packetStatistics.
///
/// In en, this message translates to:
+3
View File
@@ -2171,6 +2171,9 @@ class AppLocalizationsBg extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Статистика на пакетите';
+3
View File
@@ -2167,6 +2167,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Paketstatistiken';
+3
View File
@@ -2126,6 +2126,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Packet Statistics';
+3
View File
@@ -2163,6 +2163,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Estadísticas del Paquete';
+3
View File
@@ -2177,6 +2177,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Statistiques des paquets';
+3
View File
@@ -2180,6 +2180,9 @@ class AppLocalizationsHu extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Csomagok statisztikája';
+3
View File
@@ -2166,6 +2166,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Statistiche del Pacchetto';
+3
View File
@@ -2078,6 +2078,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX 空き時間';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'パケット統計';
+3
View File
@@ -2075,6 +2075,9 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX 에어타임';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => '패킷 통계';
+3
View File
@@ -2152,6 +2152,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX-zendtijd';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Pakketstatistieken';
+3
View File
@@ -2181,6 +2181,9 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get repeater_rxAirtime => 'Czas odbioru RX';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Statystyki pakietów';
+3
View File
@@ -2163,6 +2163,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Estatísticas de Pacote';
+3
View File
@@ -2168,6 +2168,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get repeater_rxAirtime => 'Время эфира (приём)';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Статистика пакетов';
+3
View File
@@ -2153,6 +2153,9 @@ class AppLocalizationsSk extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Statistiky balíka';
+3
View File
@@ -2150,6 +2150,9 @@ class AppLocalizationsSl extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Statistika paketa';
+3
View File
@@ -2140,6 +2140,9 @@ class AppLocalizationsSv extends AppLocalizations {
@override
String get repeater_rxAirtime => 'RX Airtime';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Paketstatistik';
+3
View File
@@ -2164,6 +2164,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get repeater_rxAirtime => 'Ефірний час RX';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => 'Статистика пакетів';
+3
View File
@@ -2035,6 +2035,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get repeater_rxAirtime => '接收空中时间';
@override
String get repeater_chanUtil => 'Channel Utilization';
@override
String get repeater_packetStatistics => '数据包统计';
+14
View File
@@ -55,6 +55,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
int? _directRx;
int? _dupFlood;
int? _dupDirect;
double? _chanUtil;
PathSelection? _pendingStatusSelection;
@override
@@ -195,6 +196,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
_lastSnr = lastSnrRaw / 4.0;
_dupDirect = directDups;
_dupFlood = floodDups;
_chanUtil = ((txAirSecs + rxAirSecs) / uptimeSecs) * 100;
});
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
connector.updateRepeaterBatterySnapshot(
@@ -285,6 +287,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
_directRx = null;
_dupFlood = null;
_dupDirect = null;
_chanUtil = null;
});
try {
@@ -572,6 +575,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
_buildInfoRow(l10n.repeater_sent, _packetTxText()),
_buildInfoRow(l10n.repeater_received, _packetRxText()),
_buildInfoRow(l10n.repeater_duplicates, _duplicateText()),
_buildInfoRow(l10n.repeater_chanUtil, _chanUtilText()),
],
),
),
@@ -677,6 +681,11 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
return l10n.repeater_packetRxTotal(_packetsRecv!, flood, direct);
}
String _chanUtilText() {
if (_chanUtil == null) return '';
return _formatPercent(_chanUtil);
}
String _duplicateText() {
final l10n = context.l10n;
if (_dupFlood != null || _dupDirect != null) {
@@ -697,6 +706,11 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
return suffix == null ? value.toString() : '$value$suffix';
}
String _formatPercent(double? p) {
if (p == null) return '';
return '${p.toStringAsFixed(2)}%';
}
String _formatSnr(double? snr) {
if (snr == null) return '';
return snr.toStringAsFixed(2);
+1
View File
@@ -8,6 +8,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
list(APPEND FLUTTER_FFI_PLUGIN_LIST
flserial
jni
)
set(PLUGIN_BUNDLED_LIBRARIES)
+34 -17
View File
@@ -3,118 +3,135 @@
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"de": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"es": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"fr": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"hu": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"it": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"ja": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"ko": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"nl": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"pl": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"pt": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"ru": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"sk": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"sl": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"sv": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"uk": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
],
"zh": [
"settings_companionDebugLog",
"settings_companionDebugLogSubtitle",
"chat_markAsUnread",
"chat_newMessages"
"chat_newMessages",
"repeater_chanUtil"
]
}
+1
View File
@@ -11,6 +11,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
list(APPEND FLUTTER_FFI_PLUGIN_LIST
flserial
flutter_local_notifications_windows
jni
)
set(PLUGIN_BUNDLED_LIBRARIES)