Skip to content

Commit 112c23d

Browse files
committed
[green] Show board ID and firmware on connect
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent 9aa59b7 commit 112c23d

4 files changed

Lines changed: 58 additions & 5 deletions

File tree

‎app/lib/connect/connect_screen.dart‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
///
99
/// readiness banner (adapter-off / unauthorized / unsupported rationale)
1010
/// → filtered scan CTA → live [ScanHit] list (advertised name + RSSI)
11-
/// → connecting progress → connected Board-info card (chip / MicroPython /
12-
/// free memory — the round-trip PROOF) + Disconnect → failure prompt,
11+
/// → connecting progress → connected Board-info card (board ID / PyBLE
12+
/// firmware / chip / MicroPython / free memory — the round-trip PROOF)
13+
/// + Disconnect → failure prompt,
1314
///
1415
/// plus an always-on compact diagnostics panel (adapter state, scan running,
1516
/// boards seen, last error) for on-hardware (HIL) debugging.
1617
///
1718
/// Binds ONLY to the neutral [ConnectController] over the [ConnectionManager]
1819
/// seam (CON-8, FR-BLE-8): NO `lib/ble` / `flutter_blue_plus` import, never a
1920
/// raw device list (SEC-4). All copy is sourced from [AppLocalizations];
20-
/// technical identifiers (the chip target, RSSI dBm, byte counts) render
21-
/// verbatim (FR-I18N-4).
21+
/// technical identifiers (board ID, firmware versions, chip target, RSSI dBm,
22+
/// byte counts) render verbatim (FR-I18N-4).
2223
library;
2324

2425
import 'package:flutter/material.dart';
@@ -416,7 +417,20 @@ class _ConnectedView extends StatelessWidget {
416417
),
417418
)
418419
else ...<Widget>[
419-
// Chip is a technical identifier — rendered verbatim (FR-I18N-4).
420+
// These PBLE/1 values are display-only technical identifiers:
421+
// render them verbatim and never substitute ScanHit.id (SEC-9).
422+
_InfoRow(
423+
label: l10n.connectDeviceBoardId,
424+
value: info.deviceId.isEmpty
425+
? l10n.connectDeviceNotReported
426+
: info.deviceId,
427+
),
428+
_InfoRow(
429+
label: l10n.connectDeviceAgentVersion,
430+
value: info.agentVersion.isEmpty
431+
? l10n.connectDeviceNotReported
432+
: info.agentVersion,
433+
),
420434
_InfoRow(label: l10n.connectDeviceChip, value: info.chip),
421435
_InfoRow(
422436
label: l10n.connectDeviceMpyVersion,

‎app/lib/localization/arb/app_en.arb‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,18 @@
13111311
"@connectDeviceInfoTitle": {
13121312
"description": "Title of the connected-board information card, which proves the round-trip by showing live DeviceInfo."
13131313
},
1314+
"connectDeviceBoardId": "Board ID",
1315+
"@connectDeviceBoardId": {
1316+
"description": "Label for the display-only PBLE/1 device_id in the board-info card. The value is rendered verbatim and is never the platform scan identifier or an authorization/profile gate."
1317+
},
1318+
"connectDeviceAgentVersion": "PyBLE firmware",
1319+
"@connectDeviceAgentVersion": {
1320+
"description": "Label for the PyBLE agent firmware SemVer in the board-info card. The value is rendered verbatim and is distinct from the MicroPython version."
1321+
},
1322+
"connectDeviceNotReported": "Not reported",
1323+
"@connectDeviceNotReported": {
1324+
"description": "Fallback shown when an additive Board ID or PyBLE firmware value is empty; absence does not gate the connection."
1325+
},
13141326
"connectDeviceChip": "Chip",
13151327
"@connectDeviceChip": {
13161328
"description": "Label for the board's chip target in the board-info card. The value (e.g. esp32, esp32-s3, esp32-c3) is a technical identifier rendered verbatim (FR-I18N-4)."

‎app/lib/localization/gen/app_localizations.dart‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,6 +1667,24 @@ abstract class AppLocalizations {
16671667
/// **'Board info'**
16681668
String get connectDeviceInfoTitle;
16691669

1670+
/// Label for the display-only PBLE/1 device_id in the board-info card. The value is rendered verbatim and is never the platform scan identifier or an authorization/profile gate.
1671+
///
1672+
/// In en, this message translates to:
1673+
/// **'Board ID'**
1674+
String get connectDeviceBoardId;
1675+
1676+
/// Label for the PyBLE agent firmware SemVer in the board-info card. The value is rendered verbatim and is distinct from the MicroPython version.
1677+
///
1678+
/// In en, this message translates to:
1679+
/// **'PyBLE firmware'**
1680+
String get connectDeviceAgentVersion;
1681+
1682+
/// Fallback shown when an additive Board ID or PyBLE firmware value is empty; absence does not gate the connection.
1683+
///
1684+
/// In en, this message translates to:
1685+
/// **'Not reported'**
1686+
String get connectDeviceNotReported;
1687+
16701688
/// Label for the board's chip target in the board-info card. The value (e.g. esp32, esp32-s3, esp32-c3) is a technical identifier rendered verbatim (FR-I18N-4).
16711689
///
16721690
/// In en, this message translates to:

‎app/lib/localization/gen/app_localizations_en.dart‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,15 @@ class AppLocalizationsEn extends AppLocalizations {
965965
@override
966966
String get connectDeviceInfoTitle => 'Board info';
967967

968+
@override
969+
String get connectDeviceBoardId => 'Board ID';
970+
971+
@override
972+
String get connectDeviceAgentVersion => 'PyBLE firmware';
973+
974+
@override
975+
String get connectDeviceNotReported => 'Not reported';
976+
968977
@override
969978
String get connectDeviceChip => 'Chip';
970979

0 commit comments

Comments
 (0)