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:
authorChristian Hammacher <bmasterc@gmail.com>2021-09-28 16:31:22 +0300
committerChristian Hammacher <bmasterc@gmail.com>2021-09-28 16:31:22 +0300
commitb3640fb1826d2998aea1e4c4dc3d4342922d82a4 (patch)
tree2c54f85e163ccc962d2ea49ca7fce0191aa58ea4 /src/Platform
parente84003ab69f398dbe84beb6c98e69c527e045852 (diff)
Directories are reported on SBC-only configs
Diffstat (limited to 'src/Platform')
-rw-r--r--src/Platform/Platform.h2
-rw-r--r--src/Platform/RepRap.cpp30
2 files changed, 16 insertions, 16 deletions
diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h
index 6016aaea..615cdd62 100644
--- a/src/Platform/Platform.h
+++ b/src/Platform/Platform.h
@@ -894,7 +894,7 @@ private:
static bool deliberateError; // true if we deliberately caused an exception for testing purposes. Must be static in case of exception during startup.
};
-#if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES
+#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE || HAS_EMBEDDED_FILES
// Where the htm etc files are
inline const char* Platform::GetWebDir() const noexcept
diff --git a/src/Platform/RepRap.cpp b/src/Platform/RepRap.cpp
index ef9fef08..cd15506a 100644
--- a/src/Platform/RepRap.cpp
+++ b/src/Platform/RepRap.cpp
@@ -249,7 +249,7 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
// Within each group, these entries must be in alphabetical order
// 0. MachineModel root
{ "boards", OBJECT_MODEL_FUNC_NOSELF(&boardsArrayDescriptor), ObjectModelEntryFlags::live },
-#if HAS_MASS_STORAGE
+#if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES || HAS_LINUX_INTERFACE
{ "directories", OBJECT_MODEL_FUNC(self, 1), ObjectModelEntryFlags::none },
#endif
{ "fans", OBJECT_MODEL_FUNC_NOSELF(&fansArrayDescriptor), ObjectModelEntryFlags::live },
@@ -272,7 +272,7 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
{ "volumes", OBJECT_MODEL_FUNC_NOSELF(&volumesArrayDescriptor), ObjectModelEntryFlags::none },
// 1. MachineModel.directories
-#if HAS_MASS_STORAGE
+#if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES || HAS_LINUX_INTERFACE
{ "filaments", OBJECT_MODEL_FUNC_NOSELF(FILAMENTS_DIRECTORY), ObjectModelEntryFlags::verbose },
{ "firmware", OBJECT_MODEL_FUNC_NOSELF(FIRMWARE_DIRECTORY), ObjectModelEntryFlags::verbose },
{ "gCodes", OBJECT_MODEL_FUNC(self->platform->GetGCodeDir()), ObjectModelEntryFlags::verbose },
@@ -313,7 +313,6 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
{ "tools", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxTools), ObjectModelEntryFlags::verbose },
{ "trackedObjects", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxTrackedObjects), ObjectModelEntryFlags::verbose },
{ "triggers", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxTriggers), ObjectModelEntryFlags::verbose },
- // TODO userVariables
#if HAS_MASS_STORAGE
{ "volumes", OBJECT_MODEL_FUNC_NOSELF((int32_t)NumSdCards), ObjectModelEntryFlags::verbose },
#else
@@ -368,7 +367,7 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
// 6. MachineModel.seqs
{ "boards", OBJECT_MODEL_FUNC((int32_t)self->boardsSeq), ObjectModelEntryFlags::live },
-#if HAS_MASS_STORAGE
+#if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES || HAS_LINUX_INTERFACE
{ "directories", OBJECT_MODEL_FUNC((int32_t)self->directoriesSeq), ObjectModelEntryFlags::live },
#endif
{ "fans", OBJECT_MODEL_FUNC((int32_t)self->fansSeq), ObjectModelEntryFlags::live },
@@ -398,18 +397,19 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
constexpr uint8_t RepRap::objectModelTableDescriptor[] =
{
- 7, // number of sub-tables
- 15 + SUPPORT_SCANNER + HAS_MASS_STORAGE, // root
-#if HAS_MASS_STORAGE
- 8, // directories
+ 7, // number of sub-tables
+ 15 + SUPPORT_SCANNER + (HAS_MASS_STORAGE | HAS_EMBEDDED_FILES | HAS_LINUX_INTERFACE), // root
+#if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES || HAS_LINUX_INTERFACE
+ 8, // directories
#else
- 0, // directories
-#endif
- 25, // limits
- 18 + HAS_VOLTAGE_MONITOR + SUPPORT_LASER, // state
- 2, // state.beep
- 6, // state.messageBox
- 12 + HAS_NETWORKING + SUPPORT_SCANNER + 3 * HAS_MASS_STORAGE // seqs
+ 0, // directories
+#endif
+ 25, // limits
+ 18 + HAS_VOLTAGE_MONITOR + SUPPORT_LASER, // state
+ 2, // state.beep
+ 6, // state.messageBox
+ 12 + HAS_NETWORKING + SUPPORT_SCANNER +
+ 2 * HAS_MASS_STORAGE + (HAS_MASS_STORAGE | HAS_EMBEDDED_FILES | HAS_LINUX_INTERFACE) // seqs
};
DEFINE_GET_OBJECT_MODEL_TABLE(RepRap)