Skip to content

Commit

Permalink
Refactor BLEManagerImpl::_OnPlatformEvent for improved code readabili…
Browse files Browse the repository at this point in the history
…ty and maintainability
  • Loading branch information
rosahay-silabs committed Jul 4, 2024
1 parent 5e86b90 commit 48a20c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/platform/silabs/rs911x/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event)

case DeviceEventType::kCHIPoBLEIndicateConfirm: {
ChipLogProgress(DeviceLayer, "_OnPlatformEvent kCHIPoBLEIndicateConfirm");
// stop the indication confirmation timer
DeviceLayer::SystemLayer().CancelTimer(OnSendIndicationTimeout, this);
HandleIndicationConfirmation(event->CHIPoBLEIndicateConfirm.ConId, &CHIP_BLE_SVC_ID, &Ble::CHIP_BLE_CHAR_2_UUID);
}
break;
Expand Down Expand Up @@ -925,11 +923,11 @@ void BLEManagerImpl::HandleRXCharWrite(rsi_ble_event_write_t * evt)

void BLEManagerImpl::HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId)
{
ChipLogDetail(DeviceLayer, "HandleTxConfirmationEvent started");
// stop the indication confirmation timer
DeviceLayer::SystemLayer().CancelTimer(OnSendIndicationTimeout, this);
ChipDeviceEvent event;
event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm;
event.CHIPoBLEIndicateConfirm.ConId = conId;
ChipLogDetail(DeviceLayer, "HandleTxConfirmationEvent post kCHIPoBLEIndicateConfirm");
PlatformMgr().PostEventOrDie(&event);
}

Expand Down

0 comments on commit 48a20c5

Please sign in to comment.