mirror of
https://github.com/bendtherules/Patient-counter-esp8266.git
synced 2026-08-18 13:52:39 +00:00
Ota remote - Add https
This commit is contained in:
Binary file not shown.
+3
-3
@@ -1,9 +1,9 @@
|
||||
#ifndef BUILD_NUMBER
|
||||
#define BUILD_NUMBER 2
|
||||
#define BUILD_NUMBER 4
|
||||
#endif
|
||||
#ifndef VERSION
|
||||
#define VERSION "v0.1.2 - 2023-11-28 11:38:15.948331"
|
||||
#define VERSION "v0.1.4 - 2023-11-28 11:53:00.628775"
|
||||
#endif
|
||||
#ifndef VERSION_SHORT
|
||||
#define VERSION_SHORT "v0.1.2"
|
||||
#define VERSION_SHORT "v0.1.4"
|
||||
#endif
|
||||
|
||||
+6
-1
@@ -6,6 +6,7 @@
|
||||
#include <version.h>
|
||||
#include <ArduinoOTA.h>
|
||||
#include <ESP8266httpUpdate.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
void setupOTALocal() {
|
||||
Serial.println("Booting");
|
||||
@@ -44,7 +45,11 @@ void handleOTALocal() {
|
||||
}
|
||||
|
||||
void handleOTARemote() {
|
||||
WiFiClient client;
|
||||
BearSSL::WiFiClientSecure client;
|
||||
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,
|
||||
};
|
||||
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);
|
||||
switch(ret) {
|
||||
case HTTP_UPDATE_FAILED:
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2
|
||||
4
|
||||
Reference in New Issue
Block a user