Skip to content

Commit ab4682e

Browse files
authored
Merge pull request #812 from sparkfun/Fix_web_config_firmware_upload
Fix BIN_HEADER for web config upload
2 parents b370bf6 + 5224ec4 commit ab4682e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Firmware/RTK_Everywhere/WebServer.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static void handleFirmwareFileUpload()
417417
{
418418
// Check file name against valid firmware names
419419
const char *BIN_EXT = "bin";
420-
const char *BIN_HEADER = "RTK_Everywhere_Firmware";
420+
const char *BIN_HEADER = "/RTK_Everywhere";
421421

422422
fileName = upload.filename;
423423

@@ -429,7 +429,7 @@ static void handleFirmwareFileUpload()
429429
// Check 'bin' extension
430430
if (strcmp(BIN_EXT, &fname[strlen(fname) - strlen(BIN_EXT)]) == 0)
431431
{
432-
// Check for 'RTK_Everywhere_Firmware' start of file name
432+
// Check for '/RTK_Everywhere' start of file name
433433
if (strncmp(fname, BIN_HEADER, strlen(BIN_HEADER)) == 0)
434434
{
435435
// Begin update process
@@ -465,6 +465,10 @@ static void handleFirmwareFileUpload()
465465
}
466466
else
467467
{
468+
// See issue #811
469+
// The Update.write seems to upload the whole file in one go
470+
// This code never gets called...
471+
468472
binBytesSent = upload.currentSize;
469473

470474
// Send an update to browser every 100k

0 commit comments

Comments
 (0)