minimal changes
This commit is contained in:
parent
0ae2d8ad4a
commit
00f01de240
3
data/manualMode.txt
Normal file
3
data/manualMode.txt
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"manual": "False"
|
||||
}
|
@ -62,8 +62,7 @@ OneWire oneWire(ONE_WIRE_BUS);
|
||||
DallasTemperature sensors(&oneWire);
|
||||
const int SENSOR_RESOLUTION = 12;
|
||||
unsigned long lastTempRequest = 0;
|
||||
const unsigned int delayInMillisSensors = 750 / (1 << (12 - SENSOR_RESOLUTION));
|
||||
;
|
||||
const unsigned int delayInMillisSensors = 750 / (1 << (12 - SENSOR_RESOLUTION)) + 100;
|
||||
|
||||
ESP8266WiFiMulti wifiMulti; // Create an instance of the ESP8266WiFiMulti class, called 'wifiMulti'
|
||||
|
||||
@ -291,9 +290,9 @@ void loop()
|
||||
temperatures.add(sensors.getTempCByIndex(0));
|
||||
root.prettyPrintTo(Serial);
|
||||
root.prettyPrintTo(temperaturesJson);
|
||||
dtostrf(sensors.getTempCByIndex(0), 1, 1, str_temp);
|
||||
sprintf(b, "%s", str_temp);
|
||||
tft.drawString(str_temp, coordinates.x[3], coordinates.y[3], 2);
|
||||
// dtostrf(sensors.getTempCByIndex(0), 1, 1, str_temp);
|
||||
// sprintf(b, "%s", str_temp);
|
||||
// tft.drawString(str_temp, coordinates.x[3], coordinates.y[3], 2);
|
||||
// Serial.println(sensors.getTempCByIndex(0));
|
||||
// Serial << "Delay: " << delayInMillisSensors << endl;
|
||||
sensors.requestTemperatures();
|
||||
@ -757,14 +756,15 @@ void handleManual()
|
||||
{
|
||||
root["manual"] = "False";
|
||||
}
|
||||
root.printTo(file);
|
||||
root.prettyPrintTo(file);
|
||||
file.close();
|
||||
combineSettings();
|
||||
// digitalWrite(ESP_TO_ARDUINO_PIN, 1);
|
||||
displayCombinedSettings();
|
||||
// digitalWrite(ESP_TO_ARDUINO_PIN,1);
|
||||
server.sendHeader("Location", "/manualMode.html"); // Redirect the client to the success page
|
||||
server.send(303);
|
||||
// server.sendHeader("Location", "/manualMode.html"); // Redirect the client to the success page
|
||||
// server.send(303);
|
||||
server.send(200);
|
||||
}
|
||||
void handleSettings()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user