Use native ADC resolution where possible (#15719)
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../module/thermistor/thermistors.h"
|
||||
|
||||
class FilamentWidthSensor {
|
||||
public:
|
||||
@ -66,7 +67,7 @@ public:
|
||||
}
|
||||
|
||||
// Convert raw measurement to mm
|
||||
static inline float raw_to_mm(const uint16_t v) { return v * 5.0f * RECIPROCAL(16383.0f); }
|
||||
static inline float raw_to_mm(const uint16_t v) { return v * 5.0f * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); }
|
||||
static inline float raw_to_mm() { return raw_to_mm(raw); }
|
||||
|
||||
// A scaled reading is ready
|
||||
|
Reference in New Issue
Block a user