Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmelveilleux committed Jul 19, 2024
1 parent 261e298 commit 7641d71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
14 changes: 7 additions & 7 deletions examples/all-clusters-app/linux/ButtonEventsSimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ void EmitInitialPress(EndpointId endpointId, uint8_t newPosition)
}
else
{
ChipLogProgress(NotSpecified, "Logged InitialPress(%" PRIu8 ") with ID %" PRIu64 " on Endpoint %" PRIu16, newPosition,
eventNumber, endpointId);
ChipLogProgress(NotSpecified, "Logged InitialPress(%u) on Endpoint %u", static_cast<unsigned>(newPosition),
static_cast<unsigned>(endpointId));
}
}

Expand All @@ -73,8 +73,8 @@ void EmitLongPress(EndpointId endpointId, uint8_t newPosition)
}
else
{
ChipLogProgress(NotSpecified, "Logged LongPress(%" PRIu8 ") with ID %" PRIu64 " on Endpoint %" PRIu16, newPosition,
eventNumber, endpointId);
ChipLogProgress(NotSpecified, "Logged LongPress(%u) on Endpoint %u", static_cast<unsigned>(newPosition),
static_cast<unsigned>(endpointId));
}
}

Expand All @@ -91,7 +91,7 @@ void EmitLongRelease(EndpointId endpointId, uint8_t previousPosition)
}
else
{
ChipLogProgress(NotSpecified, "Logged LongRelease with ID %" PRIu64 " on Endpoint %" PRIu16, eventNumber, endpointId);
ChipLogProgress(NotSpecified, "Logged LongRelease on Endpoint %u", static_cast<unsigned>(endpointId));
}
}

Expand All @@ -109,8 +109,8 @@ void EmitMultiPressComplete(EndpointId endpointId, uint8_t previousPosition, uin
}
else
{
ChipLogProgress(NotSpecified, "Logged MultiPressComplete(count=%" PRIu8 ") with ID %" PRIu64 " on Endpoint %" PRIu16, count,
eventNumber, endpointId);
ChipLogProgress(NotSpecified, "Logged MultiPressComplete(count=%u) on Endpoint %u", static_cast<unsigned>(count),
static_cast<unsigned>(endpointId));
}
}

Expand Down
11 changes: 4 additions & 7 deletions src/python_testing/TC_SWTCH.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
import chip.clusters as Clusters
from chip.clusters import ClusterObjects as ClusterObjects
from chip.clusters.Attribute import EventReadResult, TypedAttributePath
from chip.clusters.Types import NullValue
from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest,
TestStep, async_test_body, default_matter_test_main)
async_test_body, default_matter_test_main)
from mobly import asserts

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -182,8 +181,6 @@ def _expect_no_events_for_cluster(self, event_queue: queue.Queue, endpoint_id: i
elapsed = 0.0
time_remaining = timeout_sec

sequence_idx = 0

logging.info(f"Waiting {timeout_sec:.1f} seconds for no more events for cluster {expected_cluster} on endpoint {endpoint_id}")
while time_remaining > 0:
try:
Expand Down Expand Up @@ -217,7 +214,7 @@ async def test_TC_SWTCH_2_4(self):
has_msr_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchRelease) != 0
has_msl_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchLongPress) != 0
has_as_feature = (feature_map & cluster.Bitmaps.Feature.kActionSwitch) != 0
has_msm_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchMultiPress) != 0
# has_msm_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchMultiPress) != 0

if not has_ms_feature:
logging.info("Skipping rest of test: SWTCH.S.F01(MS) feature not present")
Expand All @@ -229,8 +226,8 @@ async def test_TC_SWTCH_2_4(self):
self._placeholder_for_step("1")
event_listener = EventChangeCallback(cluster)
attrib_listener = ClusterAttributeChangeAccumulator(cluster)
event_sub = await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id)
cluster_sub = await attrib_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id)
await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id)
await attrib_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id)

# Step 2: Operator does not operate switch on the DUT
self._placeholder_for_step("2")
Expand Down

0 comments on commit 7641d71

Please sign in to comment.