Repeater, room server, companion: SenseCAP Solar reads its battery voltage correctly again
pub-release / release (push) Successful in 41m4s
pub-release / release (push) Successful in 41m4s
Changelog: SenseCAP Solar (repeater, room server, companion): the battery voltage reads correctly again; since the previous release it read 0.1-0.15 V high, so the low-voltage cutoff would have let the cell run lower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba6f6cd073
commit
540f87ca77
2 files changed
+10
-3
No files matched your search
@@ -57,7 +57,10 @@ public:
|
||||
int adcvalue = 0;
|
||||
analogReadResolution(12);
|
||||
analogReference(AR_INTERNAL_3_0);
|
||||
delay(10);
|
||||
// CUSTOM (TeTeHacko): the divider is off (VBAT_ENABLE HIGH) between reads
|
||||
// since #27, so the ADC node starts high. 10 ms left ~+110..150 mV on the
|
||||
// reading (mast-three and second-mast, 26.-27. 11. 2026); 100 ms settles it.
|
||||
delay(100);
|
||||
adcvalue = analogRead(BATTERY_PIN);
|
||||
digitalWrite(VBAT_ENABLE, HIGH);
|
||||
return (adcvalue * ADC_MULTIPLIER * AREF_VOLTAGE) / 4.096;
|
||||
|
||||
Reference in new issue
Block a user