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,