Skip to content

Commit

Permalink
🐛 Use ADC_VREF for Filament Width ADC Vref (#23977)
Browse files Browse the repository at this point in the history
  • Loading branch information
manianac authored and thinkyhead committed May 7, 2022
1 parent bd5c6bf commit a6794c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/feature/filwidth.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class FilamentWidthSensor {
}

// 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); }

// A scaled reading is ready
Expand Down

0 comments on commit a6794c1

Please sign in to comment.