ZDP_MgmtLeaveReq(&leaveid,extaddr,0,0,0);这个函数里的参数设置错了
ZDP_MgmtLeaveReq(&leaveid,extaddr,1,0,0);第三个参数是1才会移除子设备
@fn ZDP_MgmtLeaveReq
*
* @brief This builds and send a Mgmt_Leave_req message.
*
* @param dstAddr - destination address of the message
* IEEEAddr - IEEE adddress of device that is removed
* RemoveChildren - set to 1 to remove the children of the
* device as well. 0 otherwise.
* Rejoin - set to 1 if the removed device should rejoin
afterwards. 0 otherwise.
*
* @return afStatus_t