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 mh-dm committed May 15, 2022
1 parent 0a57f40 commit 377f58b
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 377f58b

Please sign in to comment.