Skip to content

Commit 2809e09

Browse files
committed
release v3.2
1 parent 0578407 commit 2809e09

12 files changed

+28
-1
lines changed

HeishaMon/HeishaMon.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ void doubleResetDetect() {
905905
Serial.println("Double reset detected, clearing config."); //save to print on std serial because serial switch didn't happen yet
906906
LittleFS.begin();
907907
LittleFS.format();
908+
//create first boot file
909+
File startupFile = LittleFS.open("/heishamon", "w");
910+
startupFile.close();
908911
WiFi.persistent(true);
909912
WiFi.disconnect();
910913
WiFi.persistent(false);
@@ -1051,6 +1054,29 @@ void setup() {
10511054
Serial.println(F("--- HEISHAMON ---"));
10521055
Serial.println(F("starting..."));
10531056

1057+
//first boot check, to visually confirm good flash
1058+
if (LittleFS.begin()) {
1059+
if (LittleFS.exists("/heishamon")) {
1060+
//normal boot
1061+
} else if (LittleFS.exists("/config.json")) {
1062+
//from old firmware, create file and then normal boot
1063+
File startupFile = LittleFS.open("/heishamon", "w");
1064+
startupFile.close();
1065+
} else {
1066+
//first boot
1067+
File startupFile = LittleFS.open("/heishamon", "w");
1068+
startupFile.close();
1069+
pinMode(2, FUNCTION_0); //set it as gpio
1070+
pinMode(2, OUTPUT);
1071+
while (true) {
1072+
digitalWrite(2, HIGH);
1073+
delay(50);
1074+
digitalWrite(2, LOW);
1075+
delay(50);
1076+
}
1077+
}
1078+
}
1079+
10541080
//double reset detect from start
10551081
doubleResetDetect();
10561082

HeishaMon/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
static const char* heishamon_version = "3.2-beta-3";
1+
static const char* heishamon_version = "3.2";
-497 KB
Binary file not shown.
-498 KB
Binary file not shown.
-622 KB
Binary file not shown.
-624 KB
Binary file not shown.
-621 KB
Binary file not shown.
-623 KB
Binary file not shown.
-623 KB
Binary file not shown.
-624 KB
Binary file not shown.

0 commit comments

Comments
 (0)