From e87188e7e3be314c269914b5aab5f32fa176458a Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sun, 15 May 2022 00:35:59 +0200 Subject: [PATCH] Ensure ADC and thermistor tables use the same oversampling The current code assumes that values are directly comparable --- Firmware/temperature.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 7fe7166c9..882ffcbb5 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -43,6 +43,10 @@ #include "Timer.h" #include "Configuration_prusa.h" +#if (ADC_OVRSAMPL != OVERSAMPLENR) +#error "ADC_OVRSAMPL oversampling must match OVERSAMPLENR" +#endif + //=========================================================================== //=============================public variables============================ //===========================================================================