Skip to content

Commit 35ee955

Browse files
committed
Version 1.0.0 Release
1 parent 5f6adef commit 35ee955

39 files changed

+35
-24
lines changed

.pio/build/d1_mini/.sconsign37.dblite

29.3 KB
Binary file not shown.

.pio/build/d1_mini/Version 0.9.2.zip

-307 KB
Binary file not shown.

.pio/build/d1_mini/firmware 1.0.0.bin

433 KB
Binary file not shown.

.pio/build/d1_mini/firmware 1.0.0.zip

302 KB
Binary file not shown.

.pio/build/d1_mini/firmware.bin

-438 KB
Binary file not shown.

.pio/build/d1_mini/firmware.elf

17.9 KB
Binary file not shown.
Binary file not shown.
106 KB
Binary file not shown.
1.54 KB
Binary file not shown.
242 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

.pio/build/d1_mini/lib541/libSPI.a

0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.

.pio/build/d1_mini/lib74c/libTicker.a

0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

.pio/build/d1_mini/lib951/libWire.a

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

.pio/build/d1_mini/libbaf/libHash.a

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

.pio/build/d1_mini/src/main.cpp.o

1000 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

.pio/build/project.checksum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
72145d7b8264201a750d3a593dbd263daabc5a99
1+
ee7254b70443f58c9db42ab4d1f22ad32f88105f

pio/src/Globals.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <Ticker.h>
1818

1919
// defines go here
20-
#define FIRMWAREVERSION "0.9.2"
20+
#define FIRMWAREVERSION "1.0.0"
2121

2222
#ifndef DEBUG
2323
#define DEBUG true
@@ -98,7 +98,7 @@ extern std::vector<String> RemoteAPILabels;
9898
extern float Temperatur, Tilt, Gravity,Pressure,carbondioxide;
9999

100100
extern bool saveConfig();
101-
extern void formatSpiffs();
101+
extern void formatLittleFS();
102102
extern void validateInput(const char *input, char *output);
103103

104104
float scaleTemperature(float t);

pio/src/main.cpp

+31-20
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ All rights reserverd by S.Lang <universam@web.de>
1717
#include "webserver.h"
1818
#include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson
1919

20-
#include <FS.h> //this needs to be first
20+
#include "LittleFS.h"
21+
//#include <FS.h> //this needs to be first
2122
#include "MCP3221A5T-E.h"
2223
#include "MR44V064B.h"
2324
#include "OLED.h"
@@ -259,14 +260,14 @@ bool readConfig()
259260
{
260261
CONSOLE(F("mounting FS..."));
261262

262-
if (SPIFFS.begin())
263+
if (LittleFS.begin())
263264
{
264265
CONSOLELN(F(" mounted!"));
265-
if (SPIFFS.exists(CFGFILE))
266+
if (LittleFS.exists(CFGFILE))
266267
{
267268
// file exists, reading and loading
268269
CONSOLELN(F("reading config file"));
269-
File configFile = SPIFFS.open(CFGFILE, "r");
270+
File configFile = LittleFS.open(CFGFILE, "r");
270271
if (configFile)
271272
{
272273
size_t size = configFile.size();
@@ -415,22 +416,22 @@ String htmlencode(String str)
415416
return encodedstr;
416417
}
417418

418-
void formatSpiffs()
419+
void formatLittleFS()
419420
{
420-
CONSOLE(F("\nneed to format SPIFFS: "));
421-
SPIFFS.end();
422-
SPIFFS.begin();
423-
CONSOLELN(SPIFFS.format());
421+
CONSOLE(F("\nneed to format LittleFS: "));
422+
LittleFS.end();
423+
LittleFS.begin();
424+
CONSOLELN(LittleFS.format());
424425
}
425426

426427
bool saveConfig()
427428
{
428429
CONSOLE(F("saving config..."));
429430

430-
// if SPIFFS is not usable
431-
if (!SPIFFS.begin() || !SPIFFS.exists(CFGFILE) ||
432-
!SPIFFS.open(CFGFILE, "w"))
433-
formatSpiffs();
431+
// if LittleFS is not usable
432+
if (!LittleFS.begin() || !LittleFS.exists(CFGFILE) ||
433+
!LittleFS.open(CFGFILE, "w"))
434+
formatLittleFS();
434435

435436
DynamicJsonDocument doc(1024);
436437

@@ -455,11 +456,11 @@ bool saveConfig()
455456
doc["Mode"] = (int) g_flashConfig.mode;
456457
doc["Display"] = (int) g_flashConfig.display;
457458

458-
File configFile = SPIFFS.open(CFGFILE, "w+");
459+
File configFile = LittleFS.open(CFGFILE, "w+");
459460
if (!configFile)
460461
{
461462
CONSOLELN(F("failed to open config file for writing"));
462-
SPIFFS.end();
463+
LittleFS.end();
463464
return false;
464465
}
465466
else
@@ -469,7 +470,7 @@ bool saveConfig()
469470
#endif
470471
serializeJson(doc, configFile);
471472
configFile.close();
472-
SPIFFS.end();
473+
LittleFS.end();
473474
CONSOLELN(F("saved successfully"));
474475
return true;
475476
}
@@ -1299,6 +1300,13 @@ void loop()
12991300
disp->setLine(7);
13001301
disp->printf("th.CO2: %.2f g/l ", p_Statistic_->theoretical_carbonisation);
13011302
}
1303+
else
1304+
{
1305+
disp->setLine(7);
1306+
// String test = g_flashConfig.name + " / " + WiFi.localIP().toString(); //
1307+
disp->printf("%s",g_flashConfig.name.c_str());
1308+
}
1309+
13021310
}
13031311

13041312

@@ -1308,15 +1316,15 @@ void loop()
13081316
}
13091317
else {
13101318
disp->setLine(0);
1311-
disp->printf("Druck: %.2f bar ", Pressure);
1319+
disp->printf("Druck: %10.2f bar", Pressure);
13121320
disp->setLine(1);
1313-
disp->printf("Temp: %.2f 'C", Temperatur);
1321+
disp->printf("Temp: %11.2f °C", Temperatur);
13141322
disp->setLine(2);
1315-
disp->printf("CO2: %6.2f g/l ", carbondioxide);
1323+
disp->printf("CO2: %12.2f g/l", carbondioxide);
13161324

13171325
if (g_flashConfig.mode == ModeSpundingValve) {
13181326
disp->setLine(3);
1319-
disp->printf("Zeit: %5.2f s", p_Statistic_->opening_time/1000);
1327+
disp->printf("Zeit: %11.2f s", p_Statistic_->opening_time/1000);
13201328
if(g_flashConfig.display != DisplayHD44780)
13211329
{
13221330
disp->setLine(4);
@@ -1341,6 +1349,9 @@ void loop()
13411349
{
13421350
disp->setLine(5);
13431351
disp->print("Gaerung ");
1352+
String test = "IP: " + WiFi.localIP().toString();
1353+
disp->setLine(6);
1354+
disp->print(test.c_str());
13441355
}
13451356

13461357
}

pio/src/webserver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ void Webserver::handleReset()
14631463
delay(1000);
14641464
WiFi.disconnect(true); // Wipe out WiFi credentials.
14651465
resetSettings();
1466-
formatSpiffs();
1466+
formatLittleFS();
14671467
FRAM.reset_settings();
14681468
ESP.reset();
14691469
delay(2000);

0 commit comments

Comments
 (0)