pax.express migration 2 (work in progress)

This commit is contained in:
cyberman54 committed 2021-03-22 23:10:07 +01:00
1 parent 6a3fcd9191
commit 8c9325320a
4 files changed
+28 -28

No files matched your search

+5 -5
View File
@@ -21,8 +21,8 @@
using namespace std;
const BintrayClient bintray(BINTRAY_USER, BINTRAY_REPO, BINTRAY_PACKAGE);
// usage of bintray: see https://github.com/r0oland/bintray-secure-ota
const BintrayClient paxexpress(PAXEXPRESS_USER, PAXEXPRESS_REPO, PAXEXPRESS_PACKAGE);
// usage of paxexpress: see https://github.com/paxexpress/docs
// Connection port (HTTPS)
const int port = 443;
@@ -121,7 +121,7 @@ int do_ota_update() {
if (WiFi.status() != WL_CONNECTED)
return 1;
const String latest = bintray.getLatestVersion();
const String latest = paxexpress.getLatestVersion();
if (latest.length() == 0) {
ESP_LOGI(TAG, "Could not fetch info on latest firmware");
@@ -138,14 +138,14 @@ int do_ota_update() {
ota_display(3, "**", "");
if (WiFi.status() != WL_CONNECTED)
return 1;
String firmwarePath = bintray.getBinaryPath(latest);
String firmwarePath = paxexpress.getBinaryPath(latest);
if (!firmwarePath.endsWith(".bin")) {
ESP_LOGI(TAG, "Unsupported binary format");
ota_display(3, " E", "file type error");
return -1;
}
String currentHost = bintray.getStorageHost();
String currentHost = paxexpress.getStorageHost();
String prevHost = currentHost;
WiFiClientSecure client;
+4 -4
View File
@@ -2,7 +2,7 @@
OTA_WIFI_SSID = MyHomeWifi
OTA_WIFI_PASS = FooBar42!
[bintray]
BINTRAY_USER = MyBintrayUser
BINTRAY_REPO = MyBintrayRepo
BINTRAY_API_TOKEN = 3894a7a51d70c6523c1b7479261c34845ebf7878
[paxexpress]
PAXEXPRESS_USER = MyPaxexpressUser
PAXEXPRESS_REPO = MyPaxexpressRepo
PAXEXPRESS_API_TOKEN = 3894a7a51d70c6523c1b7479261c34845ebf7878