mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 00:47:17 +02:00
Downloaded filename and AP ssid
ap ssid format have serial number filname have last 4 digit serial number
This commit is contained in:
@ -81,7 +81,9 @@ void LocalServer::_GET_dashboard(void) {
|
||||
void LocalServer::_GET_storage(void) {
|
||||
char *data = measure.getLocalStorage();
|
||||
if (data != nullptr) {
|
||||
server.sendHeader("Content-Disposition", "attachment; filename=\"measurements.csv\"");
|
||||
String filename =
|
||||
"measurements-" + ag->deviceId().substring(8) + ".csv"; // measurements-fdsa.csv
|
||||
server.sendHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
|
||||
server.send(200, "text/plain", data);
|
||||
free(data);
|
||||
} else {
|
||||
|
@ -187,13 +187,16 @@ void setup() {
|
||||
delay(DISPLAY_DELAY_SHOW_CONTENT_MS);
|
||||
}
|
||||
|
||||
String deviceId = ag->deviceId();
|
||||
|
||||
// Connect to Wi-Fi network with SSID and password
|
||||
Serial.print("Setting AP (Access Point)…");
|
||||
// Remove the password parameter, if you want the AP (Access Point) to be open
|
||||
WiFi.softAP("airgradient", "cleanair");
|
||||
WiFi.softAP("ag_" + deviceId, "cleanair");
|
||||
IPAddress IP = WiFi.softAPIP();
|
||||
Serial.print("AP IP address: ");
|
||||
Serial.println(IP);
|
||||
Serial.printf("SSID: ag_%s\n", deviceId.c_str());
|
||||
|
||||
oledDisplay.setText("", "Offline Storage Mode", "");
|
||||
|
||||
|
Reference in New Issue
Block a user