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>2022-01-05 20:41:13 +0300
committerDavid Crocker <dcrocker@eschertech.com>2022-01-05 20:41:13 +0300
commit4f4e9453e28cb13278f21d83d12899144fce8c7f (patch)
tree03a4455e824a4ae8051012f6d89edb772d1447f0 /src/Platform/Platform.cpp
parent191dba062b1781185253c1d322f44fb412e18aa5 (diff)
Prevent LinearAnalog filtering being enabled if port hasn't a filter
Diffstat (limited to 'src/Platform/Platform.cpp')
-rw-r--r--src/Platform/Platform.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp
index 1b4e2ebb..8e1b12f8 100644
--- a/src/Platform/Platform.cpp
+++ b/src/Platform/Platform.cpp
@@ -2353,9 +2353,9 @@ GCodeResult Platform::DiagnosticTest(GCodeBuffer& gb, const StringRef& reply, Ou
// Note, the Thermistor code assumes that this is also the thermistor input number
int Platform::GetAveragingFilterIndex(const IoPort& port) const noexcept
{
- for (size_t i = 0; i < NumAdcFilters; ++i)
+ for (size_t i = 0; i < ARRAY_SIZE(TEMP_SENSE_PINS); ++i)
{
- if (port.GetAnalogChannel() == filteredAdcChannels[i])
+ if (port.GetPin() == TEMP_SENSE_PINS[i])
{
return (int)i;
}