diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-09-17 15:48:29 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-09-17 15:48:29 +0300 |
commit | a9d2b4f6a7be9b42dd289256f34f4310def9dc23 (patch) | |
tree | ea1cc74db6bb17e6ab6083c18c44fdcece0e7ef3 /src/FilamentMonitors | |
parent | 07f3604832b918a5e334ba51e655366ad5d1a2a9 (diff) |
Added extra fields for MFM and LFM in ATE build
Diffstat (limited to 'src/FilamentMonitors')
-rw-r--r-- | src/FilamentMonitors/LaserFilamentMonitor.cpp | 19 | ||||
-rw-r--r-- | src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp | 19 |
2 files changed, 36 insertions, 2 deletions
diff --git a/src/FilamentMonitors/LaserFilamentMonitor.cpp b/src/FilamentMonitors/LaserFilamentMonitor.cpp index 44fc2c1d..042f6f64 100644 --- a/src/FilamentMonitors/LaserFilamentMonitor.cpp +++ b/src/FilamentMonitors/LaserFilamentMonitor.cpp @@ -30,9 +30,16 @@ constexpr ObjectModelTableEntry LaserFilamentMonitor::objectModelTable[] = { // Within each group, these entries must be in alphabetical order // 0. LaserFilamentMonitor members +#ifdef DUET3_ATE + { "brightness", OBJECT_MODEL_FUNC((int32_t)self->brightness), ObjectModelEntryFlags::live }, +#endif { "calibrated", OBJECT_MODEL_FUNC_IF(self->IsLocal() && self->dataReceived && self->HaveCalibrationData(), self, 1), ObjectModelEntryFlags::none }, { "configured", OBJECT_MODEL_FUNC(self, 2), ObjectModelEntryFlags::none }, { "enabled", OBJECT_MODEL_FUNC(self->comparisonEnabled), ObjectModelEntryFlags::none }, +#ifdef DUET3_ATE + { "position", OBJECT_MODEL_FUNC((int32_t)self->sensorValue), ObjectModelEntryFlags::live }, + { "shutter", OBJECT_MODEL_FUNC((int32_t)self->shutter), ObjectModelEntryFlags::live }, +#endif { "status", OBJECT_MODEL_FUNC(self->GetStatusText()), ObjectModelEntryFlags::live }, { "type", OBJECT_MODEL_FUNC_NOSELF("laser"), ObjectModelEntryFlags::none }, @@ -49,7 +56,17 @@ constexpr ObjectModelTableEntry LaserFilamentMonitor::objectModelTable[] = { "sampleDistance", OBJECT_MODEL_FUNC(self->minimumExtrusionCheckLength, 1), ObjectModelEntryFlags::none }, }; -constexpr uint8_t LaserFilamentMonitor::objectModelTableDescriptor[] = { 3, 5, 4, 4 }; +constexpr uint8_t LaserFilamentMonitor::objectModelTableDescriptor[] = +{ + 3, +#ifdef DUET3_ATE + 8, +#else + 5, +#endif + 4, + 4 +}; DEFINE_GET_OBJECT_MODEL_TABLE(LaserFilamentMonitor) diff --git a/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp b/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp index f20a43e2..220d381f 100644 --- a/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp +++ b/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp @@ -30,9 +30,16 @@ constexpr ObjectModelTableEntry RotatingMagnetFilamentMonitor::objectModelTable[ { // Within each group, these entries must be in alphabetical order // 0. RotatingMagnetFilamentMonitor members +#ifdef DUET3_ATE + { "agc", OBJECT_MODEL_FUNC((int32_t)self->agc), ObjectModelEntryFlags::live }, +#endif { "calibrated", OBJECT_MODEL_FUNC_IF(self->IsLocal() && self->dataReceived && self->HaveCalibrationData(), self, 1), ObjectModelEntryFlags::none }, { "configured", OBJECT_MODEL_FUNC(self, 2), ObjectModelEntryFlags::none }, { "enabled", OBJECT_MODEL_FUNC(self->comparisonEnabled), ObjectModelEntryFlags::none }, +#ifdef DUET3_ATE + { "mag", OBJECT_MODEL_FUNC((int32_t)self->magnitude), ObjectModelEntryFlags::live }, + { "position", OBJECT_MODEL_FUNC((int32_t)self->sensorValue), ObjectModelEntryFlags::live }, +#endif { "status", OBJECT_MODEL_FUNC(self->GetStatusText()), ObjectModelEntryFlags::live }, { "type", OBJECT_MODEL_FUNC_NOSELF("rotatingMagnet"), ObjectModelEntryFlags::none }, @@ -49,7 +56,17 @@ constexpr ObjectModelTableEntry RotatingMagnetFilamentMonitor::objectModelTable[ { "sampleDistance", OBJECT_MODEL_FUNC(self->minimumExtrusionCheckLength, 1), ObjectModelEntryFlags::none }, }; -constexpr uint8_t RotatingMagnetFilamentMonitor::objectModelTableDescriptor[] = { 3, 5, 4, 4 }; +constexpr uint8_t RotatingMagnetFilamentMonitor::objectModelTableDescriptor[] = +{ + 3, +#ifdef DUET3_ATE + 8, +#else + 5, +#endif + 4, + 4 +}; DEFINE_GET_OBJECT_MODEL_TABLE(RotatingMagnetFilamentMonitor) |