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>2020-12-18 12:06:29 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-12-18 12:06:29 +0300
commit0562425411ecde77d87695512b77b3568d07fcd6 (patch)
treeabe343f8c46194709152a0fe1776933c7ed8caf6 /src/RepRap.cpp
parentf7f75b23537708ac293e7e22e5b38a24473d707b (diff)
Filament monitors can now be deleted usimng M591 D# P0
Also added WatchBuffer debug code to RepRap.cpp
Diffstat (limited to 'src/RepRap.cpp')
-rw-r--r--src/RepRap.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/RepRap.cpp b/src/RepRap.cpp
index 2dd00370..4f2402f8 100644
--- a/src/RepRap.cpp
+++ b/src/RepRap.cpp
@@ -415,6 +415,34 @@ RepRap::RepRap() noexcept
// Don't call constructors for other objects here
}
+#if 0
+
+///DEBUG to catch memory corruption
+const size_t WatchSize = 32768;
+uint32_t *watchBuffer;
+
+static void InitWatchBuffer() noexcept
+{
+ watchBuffer = (uint32_t*)malloc(WatchSize);
+ memset(watchBuffer, 0x5A, WatchSize);
+}
+
+static void CheckWatchBuffer(unsigned int module) noexcept
+{
+ uint32_t *p = watchBuffer, *end = watchBuffer + 32768/sizeof(uint32_t);
+ while (p < end)
+ {
+ if (*p != 0x5A5A5A5A)
+ {
+ debugPrintf("Address %p data %08" PRIx32 " module %u\n", p, *p, module);
+ *p = 0x5A5A5A5A;
+ }
+ ++p;
+ }
+}
+
+#endif
+
void RepRap::Init() noexcept
{
OutputBuffer::Init();