Skip to content

Commit 67dd5fc

Browse files
author
dingo35
committed
network.cpp: fix firmware upload link
1 parent da34a9c commit 67dd5fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SmartEVSE-3/src/network.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,12 @@ static void fn_http_server(struct mg_connection *c, int ev, void *ev_data) {
855855
mg_http_get_var(&hm->query, "debug", buf, sizeof(buf));
856856
debug = strtol(buf, NULL, 0);
857857
if (!memcmp(owner, OWNER_FACT, sizeof(OWNER_FACT)) || (!memcmp(owner, OWNER_COMM, sizeof(OWNER_COMM)))) {
858-
asprintf(&downloadUrl, "%s/%s_sensorboxv2_firmware.%ssigned.bin", FW_DOWNLOAD_PATH, owner, debug ? "debug.": ""); //will be freed in FirmwareUpdate() ; format: http://s3.com/fact_sensorboxv2_firmware.debug.signed.bin
858+
#ifdef SENSORBOX_VERSION
859+
asprintf(&downloadUrl, "%s/%s_sensorboxv2_firmware.%ssigned.bin", FW_DOWNLOAD_PATH, owner, debug ? "debug.": ""); //will be freed in FirmwareUpdate() ; format: http://s3.com/dingo35_sensorboxv2_firmware.debug.signed.bin
860+
#else
861+
asprintf(&downloadUrl, "%s/%s_firmware.%ssigned.bin", FW_DOWNLOAD_PATH, owner, debug ? "debug.": ""); //will be freed in FirmwareUpdate() ; format: http://s3.com/dingo35_firmware.debug.signed.bin
862+
863+
#endif
859864
RunFirmwareUpdate();
860865
} // after the first call we just report progress
861866
DynamicJsonDocument doc(64); // https://arduinojson.org/v6/assistant/

0 commit comments

Comments
 (0)