🐛 Use ADC_VREF for Filament Width ADC Vref (#23977)

This commit is contained in:
Manianac 2022-03-31 17:23:52 -07:00 committed by Scott Lahteine
parent bd5c6bf23c
commit a6794c1862

View file

@ -67,7 +67,7 @@ public:
} }
// Convert raw measurement to mm // Convert raw measurement to mm
static float raw_to_mm(const uint16_t v) { return v * 5.0f * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); } static float raw_to_mm(const uint16_t v) { return v * float(ADC_VREF) * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); }
static float raw_to_mm() { return raw_to_mm(raw); } static float raw_to_mm() { return raw_to_mm(raw); }
// A scaled reading is ready // A scaled reading is ready