Merge pull request #3184 from meshtastic/rp2040-ADC-hotfix

Fix analog adc init resolution for all architectures
pull/3183/head^2
code8buster 2024-02-08 21:36:08 +00:00 zatwierdzone przez GitHub
commit f4151a7108
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -389,10 +389,8 @@ bool Power::analogInit()
#else
analogReference(AR_INTERNAL); // 3.6V
#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
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);
batteryLevel = &analogLevel;
return true;
@ -900,4 +898,4 @@ bool Power::axpChipInit()
#else
return false;
#endif
}
}