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>2021-12-10 12:37:55 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-12-10 12:37:55 +0300
commite2955f3209e417a3b71d42542c481250a03ce9c7 (patch)
treeeb706c71a0b8a553100226771896ec91aa44508a /src/Platform
parentcc12d7eb9d2db88b9139ae64c68656ef220c0fd1 (diff)
Added 'important' flag in object model; support Duet 2 SBC in ATE
Added an "important" flag to the object model field flags and the object model query flags, as part of a fix for PaneDue and M291 S3 messages commanded from macro files In the Duet 2 SBC build, initialise the PanelDue port by default, for the ATE
Diffstat (limited to 'src/Platform')
-rw-r--r--src/Platform/RepRap.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/Platform/RepRap.cpp b/src/Platform/RepRap.cpp
index 86317c53..f36b10fd 100644
--- a/src/Platform/RepRap.cpp
+++ b/src/Platform/RepRap.cpp
@@ -341,7 +341,7 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
{ "logLevel", OBJECT_MODEL_FUNC(self->platform->GetLogLevel()), ObjectModelEntryFlags::none },
{ "machineMode", OBJECT_MODEL_FUNC(self->gCodes->GetMachineModeString()), ObjectModelEntryFlags::none },
{ "macroRestarted", OBJECT_MODEL_FUNC(self->gCodes->GetMacroRestarted()), ObjectModelEntryFlags::none },
- { "messageBox", OBJECT_MODEL_FUNC_IF(self->mbox.active, self, 5), ObjectModelEntryFlags::none },
+ { "messageBox", OBJECT_MODEL_FUNC_IF(self->mbox.active, self, 5), ObjectModelEntryFlags::important },
{ "msUpTime", OBJECT_MODEL_FUNC_NOSELF((int32_t)(context.GetStartMillis() % 1000u)), ObjectModelEntryFlags::live },
{ "nextTool", OBJECT_MODEL_FUNC((int32_t)self->gCodes->GetNewToolNumber()), ObjectModelEntryFlags::live },
#if HAS_VOLTAGE_MONITOR
@@ -358,12 +358,12 @@ constexpr ObjectModelTableEntry RepRap::objectModelTable[] =
{ "frequency", OBJECT_MODEL_FUNC((int32_t)self->beepFrequency), ObjectModelEntryFlags::none },
// 5. MachineModel.state.messageBox (FIXME acquire MutexLocker when accessing the following)
- { "axisControls", OBJECT_MODEL_FUNC((int32_t)self->mbox.controls.GetRaw()), ObjectModelEntryFlags::none },
- { "message", OBJECT_MODEL_FUNC(self->mbox.message.c_str()), ObjectModelEntryFlags::none },
- { "mode", OBJECT_MODEL_FUNC((int32_t)self->mbox.mode), ObjectModelEntryFlags::none },
- { "seq", OBJECT_MODEL_FUNC((int32_t)self->mbox.seq), ObjectModelEntryFlags::none },
- { "timeout", OBJECT_MODEL_FUNC((int32_t)self->mbox.timeout), ObjectModelEntryFlags::none },
- { "title", OBJECT_MODEL_FUNC(self->mbox.title.c_str()), ObjectModelEntryFlags::none },
+ { "axisControls", OBJECT_MODEL_FUNC((int32_t)self->mbox.controls.GetRaw()), ObjectModelEntryFlags::important },
+ { "message", OBJECT_MODEL_FUNC(self->mbox.message.c_str()), ObjectModelEntryFlags::important },
+ { "mode", OBJECT_MODEL_FUNC((int32_t)self->mbox.mode), ObjectModelEntryFlags::important },
+ { "seq", OBJECT_MODEL_FUNC((int32_t)self->mbox.seq), ObjectModelEntryFlags::important },
+ { "timeout", OBJECT_MODEL_FUNC((int32_t)self->mbox.timeout), ObjectModelEntryFlags::important },
+ { "title", OBJECT_MODEL_FUNC(self->mbox.title.c_str()), ObjectModelEntryFlags::important },
// 6. MachineModel.seqs
{ "boards", OBJECT_MODEL_FUNC((int32_t)self->boardsSeq), ObjectModelEntryFlags::live },
@@ -627,6 +627,13 @@ void RepRap::Init() noexcept
sbcInterface->Init();
# endif
}
+#elif defined(DUET_NG)
+ // It's the SBC build of Duet 2 firmware. Enable the PanelDue port so that the ATE can test it.
+ platform->SetBaudRate(1, 57600);
+ platform->SetCommsProperties(1, 1);
+ gCodes->SetAux0CommsProperties(1);
+ platform->SetAuxRaw(0, false);
+ platform->EnableAux(0);
#endif
#if HAS_SBC_INTERFACE