Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2022-08-08 23:27:06 +0300
committerDavid Crocker <dcrocker@eschertech.com>2022-08-08 23:27:06 +0300
commit404d855527bb0247e330ef43ad884201262b0c26 (patch)
tree82ffd075ac96bdc4f5d6ca0ed970f0cdd646e0c9
parent366b0e868f448ea1a208d26b601187ad50ae93aa (diff)
Fixed build errors in some configurations
-rw-r--r--src/GCodes/GCodes4.cpp2
-rw-r--r--src/Networking/MulticastDiscovery/MulticastResponder.h3
-rw-r--r--src/Platform/RepRap.cpp6
-rw-r--r--src/Platform/RepRap.h2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp
index 5c0a6cf5..1b8d0bd0 100644
--- a/src/GCodes/GCodes4.cpp
+++ b/src/GCodes/GCodes4.cpp
@@ -587,6 +587,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept
break;
case GCodeState::flashing2:
+#if HAS_MASS_STORAGE
if (firmwareUpdateModuleMap.IsBitSet(0))
{
// Update main firmware
@@ -601,6 +602,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept
}
catch (const GCodeException&) { }
}
+#endif
isFlashing = false;
gb.SetState(GCodeState::normal);
break;
diff --git a/src/Networking/MulticastDiscovery/MulticastResponder.h b/src/Networking/MulticastDiscovery/MulticastResponder.h
index 173a0087..a9d71bab 100644
--- a/src/Networking/MulticastDiscovery/MulticastResponder.h
+++ b/src/Networking/MulticastDiscovery/MulticastResponder.h
@@ -9,10 +9,11 @@
#define SRC_NETWORKING_MULTICASTRESPONDER_H_
#include <RepRapFirmware.h>
-#include <NetworkDefs.h>
#if SUPPORT_MULTICAST_DISCOVERY
+#include <NetworkDefs.h>
+
namespace MulticastResponder
{
void Init() noexcept;
diff --git a/src/Platform/RepRap.cpp b/src/Platform/RepRap.cpp
index 43dafec1..cf3d9cbb 100644
--- a/src/Platform/RepRap.cpp
+++ b/src/Platform/RepRap.cpp
@@ -2951,10 +2951,11 @@ bool RepRap::CheckFirmwareUpdatePrerequisites(const StringRef& reply, const Stri
return true;
}
+#if HAS_MASS_STORAGE
+
// Update the firmware. Prerequisites should be checked before calling this.
void RepRap::UpdateFirmware(const char *iapFilename, const char *iapParam) noexcept
{
-#if HAS_MASS_STORAGE
FileStore * iapFile = platform->OpenFile(FIRMWARE_DIRECTORY, iapFilename, OpenMode::read);
if (iapFile == nullptr)
{
@@ -2973,9 +2974,10 @@ void RepRap::UpdateFirmware(const char *iapFilename, const char *iapParam) noexc
iapFile->Read(reinterpret_cast<char *>(IAP_IMAGE_START), iapFile->Length());
iapFile->Close();
StartIap(iapParam);
-#endif
}
+#endif
+
void RepRap::PrepareToLoadIap() noexcept
{
#if SUPPORT_12864_LCD
diff --git a/src/Platform/RepRap.h b/src/Platform/RepRap.h
index 49c6dfd6..3500fc77 100644
--- a/src/Platform/RepRap.h
+++ b/src/Platform/RepRap.h
@@ -176,7 +176,9 @@ public:
// Firmware update operations
bool CheckFirmwareUpdatePrerequisites(const StringRef& reply, const StringRef& filenameRef) noexcept;
+#if HAS_MASS_STORAGE
void UpdateFirmware(const char *iapFilename, const char *iapParam) noexcept;
+#endif
void PrepareToLoadIap() noexcept;
[[noreturn]] void StartIap(const char *filename) noexcept;