Moved SpanPoint initialization message to main Info 'i' output
Created SpanPoint table within 'i' output
This commit is contained in:
parent
2bc8e7e89a
commit
eb53e7f6e7
|
|
@ -1027,6 +1027,20 @@ void Span::processSerialCommand(const char *c){
|
|||
Serial.print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(SpanPoint::SpanPoints.size()>0){
|
||||
uint8_t channel;
|
||||
wifi_second_chan_t channel2;
|
||||
esp_wifi_get_channel(&channel,&channel2);
|
||||
Serial.printf("\nSpanPoint Channel=%d:\n\n",channel);
|
||||
Serial.printf("%-17s %18s %7s %7s %7s\n","Local MAC Address","Remote MAC Address","Send","Receive","Depth");
|
||||
Serial.printf("%.17s %.18s %.7s %.7s %.7s\n",d,d,d,d,d);
|
||||
for(auto it=SpanPoint::SpanPoints.begin();it!=SpanPoint::SpanPoints.end();it++)
|
||||
Serial.printf("%-18s %02X:%02X:%02X:%02X:%02X:%02X %7d %7d %7d\n",(*it)->peerInfo.ifidx==WIFI_IF_AP?WiFi.softAPmacAddress().c_str():WiFi.macAddress().c_str(),
|
||||
(*it)->peerInfo.peer_addr[0],(*it)->peerInfo.peer_addr[1],(*it)->peerInfo.peer_addr[2],(*it)->peerInfo.peer_addr[3],(*it)->peerInfo.peer_addr[4],(*it)->peerInfo.peer_addr[5],
|
||||
(*it)->sendSize,(*it)->receiveSize,uxQueueSpacesAvailable((*it)->receiveQueue));
|
||||
}
|
||||
|
||||
Serial.print("\n*** End Info ***\n\n");
|
||||
}
|
||||
break;
|
||||
|
|
@ -2203,16 +2217,12 @@ SpanPoint::SpanPoint(const char *macAddress, int sendSize, int receiveSize, int
|
|||
|
||||
this->sendSize=sendSize;
|
||||
this->receiveSize=receiveSize;
|
||||
|
||||
|
||||
if(receiveSize>0)
|
||||
WiFi.mode(WIFI_AP_STA);
|
||||
else if(WiFi.getMode()==WIFI_OFF)
|
||||
WiFi.mode(WIFI_STA);
|
||||
|
||||
Serial.printf("SpanPoint: Created link from (%s) to (%02X:%02X:%02X:%02X:%02X:%02X). Send size=%d bytes, Receive size=%d bytes with queue depth=%d.\n",
|
||||
useAPaddress?WiFi.softAPmacAddress().c_str():WiFi.macAddress().c_str(),
|
||||
peerInfo.peer_addr[0],peerInfo.peer_addr[1],peerInfo.peer_addr[2],peerInfo.peer_addr[3],peerInfo.peer_addr[4],peerInfo.peer_addr[5],sendSize,receiveSize,queueDepth);
|
||||
|
||||
init(); // initialize SpanPoint
|
||||
peerInfo.channel=0; // 0 = matches current WiFi channel
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue