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-10-28 14:58:15 +0300
committerChristian Hammacher <bmasterc@gmail.com>2021-10-28 14:58:15 +0300
commit8207b22cc13e7893ae1cb43f4aef4a7632cac5b3 (patch)
treebd49861385980e72aeb6fe16fae0c3acc5895852 /src/Movement
parent5e9d621403eb54b00a84d4824b75c056121730aa (diff)
SBC improvements for 3.4-b6
Refactored various parts of the SBC interface Renamed Linux to SBC in various places CAN updater checks if file is present on SBC before update SBC task is only woken up when SPI transfers finish Bug fix: Codes that were sent back to the SBC (e.g. from USB) caused temp reports to be printed Bug fix: SBC reconnects could take longer than expected
Diffstat (limited to 'src/Movement')
-rw-r--r--src/Movement/BedProbing/Grid.cpp2
-rw-r--r--src/Movement/BedProbing/Grid.h6
-rw-r--r--src/Movement/Kinematics/HangprinterKinematics.cpp2
-rw-r--r--src/Movement/Kinematics/HangprinterKinematics.h4
-rw-r--r--src/Movement/Kinematics/Kinematics.h4
-rw-r--r--src/Movement/Kinematics/LinearDeltaKinematics.cpp2
-rw-r--r--src/Movement/Kinematics/LinearDeltaKinematics.h4
-rw-r--r--src/Movement/Kinematics/RotaryDeltaKinematics.cpp2
-rw-r--r--src/Movement/Kinematics/RotaryDeltaKinematics.h4
-rw-r--r--src/Movement/Kinematics/ZLeadscrewKinematics.cpp2
-rw-r--r--src/Movement/Kinematics/ZLeadscrewKinematics.h2
-rw-r--r--src/Movement/Move.cpp8
-rw-r--r--src/Movement/Move.h4
13 files changed, 23 insertions, 23 deletions
diff --git a/src/Movement/BedProbing/Grid.cpp b/src/Movement/BedProbing/Grid.cpp
index b94b5744..45b81a92 100644
--- a/src/Movement/BedProbing/Grid.cpp
+++ b/src/Movement/BedProbing/Grid.cpp
@@ -527,7 +527,7 @@ bool HeightMap::LoadFromFile(FileStore *f, const char *fname, const StringRef& r
#endif
-#if HAS_LINUX_INTERFACE
+#if HAS_SBC_INTERFACE
// Update the filename
void HeightMap::SetFileName(const char *name) noexcept
diff --git a/src/Movement/BedProbing/Grid.h b/src/Movement/BedProbing/Grid.h
index aa4436c0..0bcafb16 100644
--- a/src/Movement/BedProbing/Grid.h
+++ b/src/Movement/BedProbing/Grid.h
@@ -87,11 +87,11 @@ public:
bool LoadFromFile(FileStore *f, const char *fname, const StringRef& r) noexcept; // Load the grid from file returning true if an error occurred
#endif
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
const char *GetFileName() const noexcept { return fileName.c_str(); }
#endif
-#if HAS_LINUX_INTERFACE
+#if HAS_SBC_INTERFACE
void SetFileName(const char *name) noexcept; // Update the filename
void SaveToArray(float *array, float zOffset) const noexcept // Save the grid Z coordinates to an array
pre(IsValid());
@@ -112,7 +112,7 @@ private:
GridDefinition def;
float gridHeights[MaxGridProbePoints]; // The Z coordinates of the points on the bed that were probed
LargeBitmap<MaxGridProbePoints> gridHeightSet; // Bitmap of which heights are set
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
String<MaxFilenameLength> fileName; // The name of the file that this height map was loaded from or saved to
#endif
bool useMap; // True to do bed compensation
diff --git a/src/Movement/Kinematics/HangprinterKinematics.cpp b/src/Movement/Kinematics/HangprinterKinematics.cpp
index ae211220..1c05fc27 100644
--- a/src/Movement/Kinematics/HangprinterKinematics.cpp
+++ b/src/Movement/Kinematics/HangprinterKinematics.cpp
@@ -437,7 +437,7 @@ AxesBitmap HangprinterKinematics::MustBeHomedAxes(AxesBitmap axesMoving, bool di
return axesMoving;
}
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Write the parameters to a file, returning true if success
bool HangprinterKinematics::WriteCalibrationParameters(FileStore *f) const noexcept
diff --git a/src/Movement/Kinematics/HangprinterKinematics.h b/src/Movement/Kinematics/HangprinterKinematics.h
index 1a9587a9..751d39f9 100644
--- a/src/Movement/Kinematics/HangprinterKinematics.h
+++ b/src/Movement/Kinematics/HangprinterKinematics.h
@@ -24,7 +24,7 @@ public:
bool SupportsAutoCalibration() const noexcept override { return true; }
bool IsReachable(float axesCoords[MaxAxes], AxesBitmap axes) const noexcept override;
void SetCalibrationDefaults() noexcept override { Init(); }
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteCalibrationParameters(FileStore *f) const noexcept override;
#endif
LimitPositionResult LimitPosition(float finalCoords[], const float * null initialCoords, size_t numAxes, AxesBitmap axesToLimit, bool isCoordinated, bool applyM208Limits) const noexcept override;
@@ -37,7 +37,7 @@ public:
AxesBitmap GetHomingFileName(AxesBitmap toBeHomed, AxesBitmap alreadyHomed, size_t numVisibleAxes, const StringRef& filename) const noexcept override;
bool QueryTerminateHomingMove(size_t axis) const noexcept override;
void OnHomingSwitchTriggered(size_t axis, bool highEnd, const float stepsPerMm[], DDA& dda) const noexcept override;
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteResumeSettings(FileStore *f) const noexcept override;
#endif
#if DUAL_CAN
diff --git a/src/Movement/Kinematics/Kinematics.h b/src/Movement/Kinematics/Kinematics.h
index 5ef95b11..7f587662 100644
--- a/src/Movement/Kinematics/Kinematics.h
+++ b/src/Movement/Kinematics/Kinematics.h
@@ -124,7 +124,7 @@ public:
// Do nothing if auto calibration is not supported.
virtual void SetCalibrationDefaults() noexcept { }
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Write the parameters that are set by auto calibration to the config-override.g file, returning true if success
// Just return true if auto calibration is not supported.
virtual bool WriteCalibrationParameters(FileStore *f) const noexcept { return true; }
@@ -186,7 +186,7 @@ public:
// This default is good for Cartesian and Core printers, but not deltas or SCARA
virtual AxesBitmap MustBeHomedAxes(AxesBitmap axesMoving, bool disallowMovesBeforeHoming) const noexcept { return (disallowMovesBeforeHoming) ? axesMoving : AxesBitmap(); }
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Write any calibration data that we need to resume a print after power fail, returning true if successful. Override where necessary.
virtual bool WriteResumeSettings(FileStore *f) const noexcept { return true; }
#endif
diff --git a/src/Movement/Kinematics/LinearDeltaKinematics.cpp b/src/Movement/Kinematics/LinearDeltaKinematics.cpp
index e504f31e..13f951a5 100644
--- a/src/Movement/Kinematics/LinearDeltaKinematics.cpp
+++ b/src/Movement/Kinematics/LinearDeltaKinematics.cpp
@@ -785,7 +785,7 @@ void LinearDeltaKinematics::PrintParameters(const StringRef& reply) const noexce
(double)(xTilt * 100.0), (double)(yTilt * 100.0));
}
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Write the parameters that are set by auto calibration to a file, returning true if success
bool LinearDeltaKinematics::WriteCalibrationParameters(FileStore *f) const noexcept
diff --git a/src/Movement/Kinematics/LinearDeltaKinematics.h b/src/Movement/Kinematics/LinearDeltaKinematics.h
index d0e9cdcd..f00d63de 100644
--- a/src/Movement/Kinematics/LinearDeltaKinematics.h
+++ b/src/Movement/Kinematics/LinearDeltaKinematics.h
@@ -27,7 +27,7 @@ public:
bool DoAutoCalibration(size_t numFactors, const RandomProbePointSet& probePoints, const StringRef& reply) noexcept override;
void SetCalibrationDefaults() noexcept override { Init(); }
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteCalibrationParameters(FileStore *f) const noexcept override;
#endif
@@ -44,7 +44,7 @@ public:
bool QueryTerminateHomingMove(size_t axis) const noexcept override;
void OnHomingSwitchTriggered(size_t axis, bool highEnd, const float stepsPerMm[], DDA& dda) const noexcept override;
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteResumeSettings(FileStore *f) const noexcept override;
#endif
diff --git a/src/Movement/Kinematics/RotaryDeltaKinematics.cpp b/src/Movement/Kinematics/RotaryDeltaKinematics.cpp
index 595304a0..6ec33dc4 100644
--- a/src/Movement/Kinematics/RotaryDeltaKinematics.cpp
+++ b/src/Movement/Kinematics/RotaryDeltaKinematics.cpp
@@ -560,7 +560,7 @@ void RotaryDeltaKinematics::PrintParameters(const StringRef& reply) const noexce
(double)angleCorrections[DELTA_A_AXIS], (double)angleCorrections[DELTA_B_AXIS], (double)angleCorrections[DELTA_C_AXIS]);
}
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Add a space, character, and 3-element vector to the string
static void CatVector3(const StringRef& str, char c, const float vec[3]) noexcept
diff --git a/src/Movement/Kinematics/RotaryDeltaKinematics.h b/src/Movement/Kinematics/RotaryDeltaKinematics.h
index 807e301c..4b3de297 100644
--- a/src/Movement/Kinematics/RotaryDeltaKinematics.h
+++ b/src/Movement/Kinematics/RotaryDeltaKinematics.h
@@ -24,7 +24,7 @@ public:
bool SupportsAutoCalibration() const noexcept override { return true; }
bool DoAutoCalibration(size_t numFactors, const RandomProbePointSet& probePoints, const StringRef& reply) noexcept override;
void SetCalibrationDefaults() noexcept override { Init(); }
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteCalibrationParameters(FileStore *f) const noexcept override;
#endif
LimitPositionResult LimitPosition(float finalCoords[], const float * null initialCoords, size_t numVisibleAxes, AxesBitmap axesToLimit, bool isCoordinated, bool applyM208Limits) const noexcept override;
@@ -37,7 +37,7 @@ public:
AxesBitmap GetHomingFileName(AxesBitmap toBeHomed, AxesBitmap alreadyHomed, size_t numVisibleAxes, const StringRef& filename) const noexcept override;
bool QueryTerminateHomingMove(size_t axis) const noexcept override;
void OnHomingSwitchTriggered(size_t axis, bool highEnd, const float stepsPerMm[], DDA& dda) const noexcept override;
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteResumeSettings(FileStore *f) const noexcept override;
#endif
diff --git a/src/Movement/Kinematics/ZLeadscrewKinematics.cpp b/src/Movement/Kinematics/ZLeadscrewKinematics.cpp
index 63c2201c..1d56972a 100644
--- a/src/Movement/Kinematics/ZLeadscrewKinematics.cpp
+++ b/src/Movement/Kinematics/ZLeadscrewKinematics.cpp
@@ -421,7 +421,7 @@ void ZLeadscrewKinematics::AppendCorrections(const floatc_t corrections[], const
}
}
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Write any calibration data that we need to resume a print after power fail, returning true if successful
bool ZLeadscrewKinematics::WriteResumeSettings(FileStore *f) const noexcept
diff --git a/src/Movement/Kinematics/ZLeadscrewKinematics.h b/src/Movement/Kinematics/ZLeadscrewKinematics.h
index 75d2a489..4864204b 100644
--- a/src/Movement/Kinematics/ZLeadscrewKinematics.h
+++ b/src/Movement/Kinematics/ZLeadscrewKinematics.h
@@ -20,7 +20,7 @@ public:
bool Configure(unsigned int mCode, GCodeBuffer& gb, const StringRef& reply, bool& error) THROWS(GCodeException) override;
bool SupportsAutoCalibration() const noexcept override;
bool DoAutoCalibration(size_t numFactors, const RandomProbePointSet& probePoints, const StringRef& reply) noexcept override;
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteResumeSettings(FileStore *f) const noexcept override;
#endif
diff --git a/src/Movement/Move.cpp b/src/Movement/Move.cpp
index e5645c72..04781a55 100644
--- a/src/Movement/Move.cpp
+++ b/src/Movement/Move.cpp
@@ -144,7 +144,7 @@ constexpr ObjectModelTableEntry Move::objectModelTable[] =
// 6. move.compensation members
{ "fadeHeight", OBJECT_MODEL_FUNC((self->useTaper) ? self->taperHeight : std::numeric_limits<float>::quiet_NaN(), 1), ObjectModelEntryFlags::none },
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
{ "file", OBJECT_MODEL_FUNC_IF(self->usingMesh, self->heightMap.GetFileName()), ObjectModelEntryFlags::none },
#endif
{ "liveGrid", OBJECT_MODEL_FUNC_IF(self->usingMesh, (const GridDefinition *)&self->GetGrid()), ObjectModelEntryFlags::none },
@@ -179,7 +179,7 @@ constexpr uint8_t Move::objectModelTableDescriptor[] =
3,
2,
2,
- 6 + (HAS_MASS_STORAGE || HAS_LINUX_INTERFACE),
+ 6 + (HAS_MASS_STORAGE || HAS_SBC_INTERFACE),
2,
4,
#if SUPPORT_COORDINATE_ROTATION
@@ -773,7 +773,7 @@ bool Move::SaveHeightMapToFile(FileStore *f, const char *fname) noexcept
#endif
-#if HAS_LINUX_INTERFACE
+#if HAS_SBC_INTERFACE
// Save the height map Z coordinates to an array
void Move::SaveHeightMapToArray(float *arr) const noexcept
@@ -980,7 +980,7 @@ void Move::SetIdleTimeout(float timeout) noexcept
reprap.MoveUpdated();
}
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
// Write settings for resuming the print
// The GCodes module deals with the head position so all we need worry about is the bed compensation
diff --git a/src/Movement/Move.h b/src/Movement/Move.h
index ce67c023..239e8ea6 100644
--- a/src/Movement/Move.h
+++ b/src/Movement/Move.h
@@ -152,7 +152,7 @@ public:
bool SaveHeightMapToFile(FileStore *f, const char *fname) noexcept; // Save the height map to a file returning true if an error occurred
#endif
-#if HAS_LINUX_INTERFACE
+#if HAS_SBC_INTERFACE
void SaveHeightMapToArray(float *arr) const noexcept; // Save the height map Z coordinates to an array
#endif
@@ -168,7 +168,7 @@ public:
int32_t GetAccumulatedExtrusion(size_t drive, bool& isPrinting) noexcept; // Return and reset the accumulated commanded extrusion amount
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE
bool WriteResumeSettings(FileStore *f) const noexcept; // Write settings for resuming the print
#endif