首页 \ 问答 \ 两个中心,一个外围设备(Two centrals, one peripheral)

两个中心,一个外围设备(Two centrals, one peripheral)

BTLE(4.0)外设是否有可能在中央连接后保持广告,另一个中心是否可以同时连接?

我发现没有什么可以解决这个问题,而很明显,中央可以同时连接到n个外围设备。


Is it possible for a BTLE (4.0) peripheral to remain advertising after a central has connected, and could another central then also connect simultaneously?

I can find nothing addressing this clearly, while it is clear that a central can connect to n-many peripherals at once.


原文:https://stackoverflow.com/questions/11355236
更新时间:2022-04-30 16:04

最满意答案

我不确定你为什么在代码中使用2个for循环,

{% for i in  mem %} {# here you are looping members #}
     {% for j in i %} {# here you are looping attributes of the member #}
         {{ j }} {# output is bg, wass, http://.... #}
     {% endfor %}
 {% endfor %}

如果你想显示成员的名字,你只能使用一个循环

{% for i in  mem %}
<div>
    <img src="{{ i.profile_pic }}" alt="{{ i.nom }} {{ i.prenom }}" title="{{ i.nom }} {{ i.prenom }}" />
    {{ i.nom }} {{ i.prenom }}        
</div>
{% endfor %}

I'm not sure why you are using 2 for-loops in your code,

{% for i in  mem %} {# here you are looping members #}
     {% for j in i %} {# here you are looping attributes of the member #}
         {{ j }} {# output is bg, wass, http://.... #}
     {% endfor %}
 {% endfor %}

If you want to display the name of the members you should only use one loop

{% for i in  mem %}
<div>
    <img src="{{ i.profile_pic }}" alt="{{ i.nom }} {{ i.prenom }}" title="{{ i.nom }} {{ i.prenom }}" />
    {{ i.nom }} {{ i.prenom }}        
</div>
{% endfor %}

相关问答

更多