Skip to content

Commit 76dd00d

Browse files
committed
Reduce max # of reported axes in the OM, report the value in 'limits'
1 parent b1dda97 commit 76dd00d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Config/Configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,13 @@ constexpr size_t MinimumBuffersForObjectModel = 20; // Minimum number of free b
176176
#elif SAM4E || SAM4S
177177
constexpr size_t OUTPUT_BUFFER_SIZE = 256; // How many bytes does each OutputBuffer hold?
178178
constexpr size_t OUTPUT_BUFFER_COUNT = 26; // How many OutputBuffer instances do we have?
179-
constexpr size_t RESERVED_OUTPUT_BUFFERS = 1; // Number of reserved output buffers after long responses, enough to hold a status response
179+
constexpr size_t RESERVED_OUTPUT_BUFFERS = 2; // Number of reserved output buffers after long responses, enough to hold a status response
180180
constexpr size_t MinimumBuffersForObjectModel = 20; // Minimum number of free buffers we want before we start assembling a request for the object model
181181
#else
182182
# error Unsupported processor
183183
#endif
184184

185+
constexpr size_t MaxReportedAxes = 6; // This used to be fixed at 9 but that's too big for some Duet 2 configurations
185186
constexpr size_t maxQueuedCodes = 16; // How many codes can be queued?
186187

187188
#if SAME70 || SAME5x

src/Movement/Move.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ DEFINE_GET_OBJECT_MODEL_ARRAY_TABLE(Move)
140140

141141
size_t Move::GetMaxElementsToReturn(const ObjectModelArrayTableEntry *entry) const noexcept
142142
{
143-
return (entry == &objectModelArrayTable[0]) ? 9 : 0; // return at most 9 elements of move.axes
143+
return (entry == &objectModelArrayTable[0]) ? MaxReportedAxes : 0; // return at most this number of elements of move.axes unless just move.axes is requested
144144
}
145145

146146
static inline const char *_ecv_array GetFilamentName(size_t extruder) noexcept

src/Platform/RepRap.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
312312
#endif
313313
{ "monitorsPerHeater", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxMonitorsPerHeater), ObjectModelEntryFlags::verbose },
314314
{ "portsPerHeater", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxPortsPerHeater), ObjectModelEntryFlags::verbose },
315+
{ "reportedAxes", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxReportedAxes), ObjectModelEntryFlags::verbose },
315316
{ "restorePoints", OBJECT_MODEL_FUNC_NOSELF((int32_t)NumVisibleRestorePoints), ObjectModelEntryFlags::verbose },
316317
{ "sensors", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxSensors), ObjectModelEntryFlags::verbose },
317318
{ "spindles", OBJECT_MODEL_FUNC_NOSELF((int32_t)MaxSpindles), ObjectModelEntryFlags::verbose },
@@ -420,7 +421,7 @@ constexpr uint8_t RepRap::objectModelTableDescriptor[] =
420421
#else
421422
0, // directories
422423
#endif
423-
26 + SUPPORT_LED_STRIPS, // limits
424+
27 + SUPPORT_LED_STRIPS, // limits
424425
22 + HAS_VOLTAGE_MONITOR + SUPPORT_LASER, // state
425426
2, // state.beep
426427
12 + (unsigned int)HAS_NETWORKING + (2 * HAS_MASS_STORAGE) + ((unsigned int)HAS_MASS_STORAGE | (unsigned int)HAS_EMBEDDED_FILES | (unsigned int)HAS_SBC_INTERFACE) + SUPPORT_LED_STRIPS, // seqs

0 commit comments

Comments
 (0)