Skip to content

Commit

Permalink
Fix duplicate message in RAW mode
Browse files Browse the repository at this point in the history
d3fde4a5
  • Loading branch information
fairecasoimeme authored and G1K committed Feb 21, 2021
1 parent 75b1dbf commit 1e4c368
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/ZigbeeNodeControlBridge/app_zcl_event_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ void vAPP_ZCL_DeviceSpecific_Init ( void );
/****************************************************************************/
/*** Local Variables ***/
/****************************************************************************/
uint32_t tmpSqn=0;
tsZLO_ControlBridgeDevice sControlBridge;
tsCLD_ZllDeviceTable sDeviceTable = { ZLO_NUMBER_DEVICES,
{ { 0,
Expand Down Expand Up @@ -369,8 +370,11 @@ PRIVATE void APP_ZCL_cbEndpointCallback ( tsZCL_CallBackEvent* psEvent )

if (sZllState.u8RawMode == RAW_MODE_ON){
ZPS_tsAfEvent* psStackEvent = psEvent->pZPSevent;
if (psEvent->eEventType != E_ZCL_CBET_CLUSTER_UPDATE && psEvent->eEventType != E_ZCL_CBET_UNHANDLED_EVENT )
if (tmpSqn!=(psEvent->u8TransactionSequenceNumber+psEvent->pZPSevent->uEvent.sApsDataIndEvent.uSrcAddress.u16Addr)
&& psEvent->eEventType != E_ZCL_CBET_CLUSTER_UPDATE
&& psEvent->eEventType != E_ZCL_CBET_UNHANDLED_EVENT)
{
tmpSqn=(psEvent->u8TransactionSequenceNumber+psEvent->pZPSevent->uEvent.sApsDataIndEvent.uSrcAddress.u16Addr);
Znc_vSendDataIndicationToHost(psStackEvent, au8LinkTxBuffer);
return;
}
Expand Down Expand Up @@ -633,7 +637,7 @@ PRIVATE void APP_ZCL_cbEndpointCallback ( tsZCL_CallBackEvent* psEvent )
u8LinkQuality );
}
break;

case E_ZCL_CBET_DISCOVER_COMMAND_RECEIVED_RESPONSE:
{
vLog_Printf ( TRACE_ZCL, LOG_DEBUG, " (E_ZCL_CBET_DISCOVER_COMMAND_RECEIVED_RESPONSE)" );
Expand Down Expand Up @@ -671,7 +675,7 @@ PRIVATE void APP_ZCL_cbEndpointCallback ( tsZCL_CallBackEvent* psEvent )
u8LinkQuality );
}
break;

case E_ZCL_CBET_CLUSTER_CUSTOM:
{
ZNC_BUF_U8_UPD ( &au8LinkTxBuffer [0], psEvent->u8TransactionSequenceNumber, u16Length );
Expand Down

0 comments on commit 1e4c368

Please sign in to comment.