From 024072f7337f69b28e096d918d07b8391e74590b Mon Sep 17 00:00:00 2001 From: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Date: Mon, 9 Nov 2026 13:18:02 -0500 Subject: [PATCH] fix(#1132): keep the rotation SET gate as it was, pin the reconnect reset Applies the Gemini review: the rotation gate change was outside this issue's scope, so rotation SET stays on supportsIndicators. Adds a test that a new radio's device-info drops the previous radio's advert tags. Co-Authored-By: Claude Opus 5.5 --- lib/connector/meshcore_connector.dart | 2 +- test/connector/indicators_connector_test.dart | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 8b17ce24..3bfe1555 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -1938,7 +1938,7 @@ class MeshCoreConnector extends ChangeNotifier { 'rotation SET', DeviceUiSurface.rotation, buildRotationSetFrame(degrees), - advertised: supportsDisplayRotation, + advertised: supportsIndicators, ); } diff --git a/test/connector/indicators_connector_test.dart b/test/connector/indicators_connector_test.dart index 37f9adab..9ecc8b0b 100644 --- a/test/connector/indicators_connector_test.dart +++ b/test/connector/indicators_connector_test.dart @@ -284,6 +284,20 @@ void main() { expect(connector.supportsLedControl, isTrue); }); + test('the next radio does not inherit the previous radio\'s tags', () { + // Radio A: tags say LED only, bit clear. + connectWith(caps2: 0x01, tags: [offbandInfoTagLedControl]); + expect(connector.supportsDisplayControl, isFalse); + + // Radio B predates the advert and sets the bit. Its device-info drops + // A's advert, so the bit answers both. + connector.handleFrameForTest(deviceInfo()); + connector.handleFrameForTest(Uint8List.fromList(advertUnsupported())); + + expect(connector.supportsDisplayControl, isTrue); + expect(connector.supportsLedControl, isTrue); + }); + test('support is never probed: no display or LED GET is sent', () { connectWith( caps2: offbandCap2Indicators,