Skip to content

Commit 72a9a02

Browse files
authored
🐛 Use ADC_VREF for Filament Width ADC Vref (MarlinFirmware#23977)
1 parent 2dbb28f commit 72a9a02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Marlin/src/feature/filwidth.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class FilamentWidthSensor {
6767
}
6868

6969
// Convert raw measurement to mm
70-
static float raw_to_mm(const uint16_t v) { return v * 5.0f * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); }
70+
static float raw_to_mm(const uint16_t v) { return v * float(ADC_VREF) * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); }
7171
static float raw_to_mm() { return raw_to_mm(raw); }
7272

7373
// A scaled reading is ready

0 commit comments

Comments
 (0)