Reduced the AP scan max results

This commit is contained in:
Stefan Kremser
2017-02-27 21:20:15 +01:00
parent 5aa2fcf2ff
commit fc1893521f
4 changed files with 34 additions and 8 deletions

View File

@@ -34,12 +34,39 @@ bool APScan::start(){
Serial.print(getEncryption(encryption[i]));
Serial.print(" - ");
Serial.print(names[i]);
/*Serial.print(" - ");
Serial.print(vendors[i]);*/
//Serial.print(" - ");
//Serial.print(vendors[i]);
Serial.println();
}
}
//for debugging the APScan crash bug
/*if(debug){
for(int i=results;i<maxAPScanResults;i++){
Mac _ap;
_ap.set(random(255),random(255),random(255),random(255),random(255),random(255));
aps.add(_ap);
channels[i] = random(1,12);
rssi[i] = random(-30,-90);
encryption[i] = ENC_TYPE_NONE;
String _ssid = "test_dbeJwq3tPtJsuWtgULgShD9dxXV";
_ssid.toCharArray(names[i],33);
_ap._print();
Serial.print(" - ");
Serial.print(channels[i]);
Serial.print(" - ");
Serial.print(rssi[i]);
Serial.print(" - ");
Serial.print(getEncryption(encryption[i]));
Serial.print(" - ");
Serial.print(names[i]);
Serial.println();
results++;
}
}*/
if(debug) Serial.println("scan done");
if(debug) Serial.println(getResults());
return true;

View File

@@ -1,7 +1,7 @@
#ifndef APScan_h
#define APScan_h
#define maxAPScanResults 40
#define maxAPScanResults 30
#include <ESP8266WiFi.h>
#include "Mac.h"

View File

@@ -83,7 +83,7 @@ void Settings::info(){
String Settings::get(){
String json = "{";
//\"
json += "\"ssid\":\""+ssid+"\",";
json += "\"password\":\""+password+"\",";
json += "\"deauthReason\":"+(String)(int)deauthReason+",";
@@ -101,8 +101,7 @@ String Settings::get(){
json += "}";
if(i!=nameList.len-1) json += ",";
}
json += "]";
json += "}";
json += "] }";
return json;
}

View File

@@ -18,7 +18,7 @@ extern "C" {
#include "SSIDList.h"
/* ========== DEBUG ========== */
const bool debug = false;
const bool debug = true;
/* ========== DEBUG ========== */
ESP8266WebServer server(80);