mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 10:21:40 +00:00
Merge pull request #3184 from meshtastic/rp2040-ADC-hotfix
Fix analog adc init resolution for all architectures
This commit is contained in:
commit
f4151a7108
@ -389,10 +389,8 @@ bool Power::analogInit()
|
|||||||
#else
|
#else
|
||||||
analogReference(AR_INTERNAL); // 3.6V
|
analogReference(AR_INTERNAL); // 3.6V
|
||||||
#endif
|
#endif
|
||||||
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS); // Default of 12 is not very linear. Recommended to use 10 or 11
|
|
||||||
// depending on needed resolution.
|
|
||||||
|
|
||||||
#endif // ARCH_NRF52
|
#endif // ARCH_NRF52
|
||||||
|
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);
|
||||||
|
|
||||||
batteryLevel = &analogLevel;
|
batteryLevel = &analogLevel;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user