mirror of
https://github.com/bendtherules/Patient-counter-esp8266.git
synced 2026-08-18 13:52:39 +00:00
Move build to build/ folder
This commit is contained in:
+5
-6
@@ -1,10 +1,9 @@
|
|||||||
# Commit firmware.bin for upload
|
# Commit firmware.bin for upload
|
||||||
.pio/*
|
.pio
|
||||||
!.pio/build
|
build/*
|
||||||
.pio/build/*
|
!build/esp12e
|
||||||
!.pio/build/esp12e
|
build/esp12e/*
|
||||||
.pio/build/esp12e/*
|
!build/esp12e/firmware.bin
|
||||||
!.pio/build/esp12e/firmware.bin
|
|
||||||
|
|
||||||
# Don't save network credentials
|
# Don't save network credentials
|
||||||
include/networkCredentials.h
|
include/networkCredentials.h
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
#ifndef BUILD_NUMBER
|
#ifndef BUILD_NUMBER
|
||||||
#define BUILD_NUMBER 9
|
#define BUILD_NUMBER 28
|
||||||
#endif
|
#endif
|
||||||
#ifndef VERSION
|
#ifndef VERSION
|
||||||
#define VERSION "v0.1.9 - 2023-11-28 12:03:55.553853"
|
#define VERSION "v0.1.28 - 2023-11-28 13:25:47.461259"
|
||||||
#endif
|
#endif
|
||||||
#ifndef VERSION_SHORT
|
#ifndef VERSION_SHORT
|
||||||
#define VERSION_SHORT "v0.1.9"
|
#define VERSION_SHORT "v0.1.28"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
|
[platformio]
|
||||||
|
build_dir = build
|
||||||
|
|
||||||
[env:esp12e]
|
[env:esp12e]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = esp12e
|
board = esp12e
|
||||||
|
|||||||
+16
-6
@@ -45,19 +45,29 @@ void handleOTALocal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void handleOTARemote() {
|
void handleOTARemote() {
|
||||||
BearSSL::WiFiClientSecure client;
|
WiFiClient client;
|
||||||
const uint8_t fingerprint[20] = {
|
const uint8_t fingerprint[20] = {
|
||||||
0xe9, 0x4e, 0x54, 0xa9, 0x30, 0x86, 0x3d, 0x53, 0x5b, 0xa0, 0xd2, 0xd3, 0xa5, 0xdd, 0x0d, 0xe3, 0xbd, 0xa8, 0xc9, 0xc2,
|
0xe9, 0x4e, 0x54, 0xa9, 0x30, 0x86, 0x3d, 0x53, 0x5b, 0xa0, 0xd2, 0xd3, 0xa5, 0xdd, 0x0d, 0xe3, 0xbd, 0xa8, 0xc9, 0xc2,
|
||||||
};
|
};
|
||||||
client.setFingerprint(fingerprint);
|
// client.setFingerprint(fingerprint);
|
||||||
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "https://github.com/bendtherules/Patient-counter-esp8266/raw/main/.pio/build/esp12e/firmware.bin", VERSION_SHORT);
|
// client.setInsecure();
|
||||||
|
const char* host = "www.github.com";
|
||||||
|
const int httpsPort = 80;
|
||||||
|
Serial.println(host);
|
||||||
|
if (!client.connect(host, httpsPort)) {
|
||||||
|
Serial.println("connection failed");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
Serial.println("connection worked");
|
||||||
|
}
|
||||||
|
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "http://github.com/bendtherules/Patient-counter-esp8266/raw/main ", VERSION_SHORT);
|
||||||
switch(ret) {
|
switch(ret) {
|
||||||
case HTTP_UPDATE_FAILED:
|
case HTTP_UPDATE_FAILED:
|
||||||
Serial.println("[update] Update failed.");
|
Serial.print("[update] Update failed. Reason - ");
|
||||||
|
Serial.println(ESPhttpUpdate.getLastErrorString());
|
||||||
break;
|
break;
|
||||||
case HTTP_UPDATE_NO_UPDATES:
|
case HTTP_UPDATE_NO_UPDATES:
|
||||||
Serial.print("[update] Update no Update. Reason -");
|
Serial.println("[update] Update no Update.");
|
||||||
Serial.println(ESPhttpUpdate.getLastErrorString());
|
|
||||||
break;
|
break;
|
||||||
case HTTP_UPDATE_OK:
|
case HTTP_UPDATE_OK:
|
||||||
Serial.println("[update] Update ok."); // may not be called since we reboot the ESP
|
Serial.println("[update] Update ok."); // may not be called since we reboot the ESP
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
9
|
28
|
||||||
Reference in New Issue
Block a user