Skip to content

Commit

Permalink
🐛 Use ADC_VREF for Filament Width ADC Vref (MarlinFirmware#23977)
Browse files Browse the repository at this point in the history
  • Loading branch information
manianac authored and LCh-77 committed Apr 19, 2022
1 parent b2b9f63 commit 8b05698
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 8b05698

Please sign in to comment.