Browse Source

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

Manianac 3 years ago
parent
commit
72a9a02c17
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/feature/filwidth.h

+ 1
- 1
Marlin/src/feature/filwidth.h View File

67
   }
67
   }
68
 
68
 
69
   // Convert raw measurement to mm
69
   // 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)); }
71
   static float raw_to_mm() { return raw_to_mm(raw); }
71
   static float raw_to_mm() { return raw_to_mm(raw); }
72
 
72
 
73
   // A scaled reading is ready
73
   // A scaled reading is ready

Loading…
Cancel
Save